Results 1 to 6 of 6

Thread: Text AND icon in toolbar?

  1. #1

    Default Text AND icon in toolbar?

    Hi,

    I have a toolbar with associated icons...fine. Im wondering is there a way to have the toolbar display the associated icon AND an associated text string? I know there is a tooltip text associated with the icons and that text is displayed if there is NO icon, but we are seeking to have both...icon on top of an associated command text...

    I cant see this being currently available, but if it is Id be grateful for a hint on what im missing...otherwise - perhaps a pointer or two on the right classes to look at to implement it myself?

    Many thanks in advance...

    Alan

  2. #2
    Join Date
    Aug 2004
    Location
    Switzerland
    Posts
    32

    Default

    Hi,

    just a quick hack, maybe there are better ways.

    Code:
    public void onPreWindowOpen(ApplicationWindowConfigurer configurer) {
      super.onPreWindowOpen(configurer);
            
      DefaultCommandServices.instance().setToolBarButtonConfigurer( new DefaultCommandButtonConfigurer() {
          public void configure(AbstractButton button, AbstractCommand command, CommandFaceDescriptor faceDescriptor) {
            super.configure(button, command, faceDescriptor);
            
            button.putClientProperty( "hideActionText", Boolean.FALSE);
            button.setMargin(new Insets(2, 5, 2, 5));
        }
      });
    }
    It also would be interesting to configure it thru the properties framework, so users can choose if they want a text or not in the toolbar?


    hope it helps
    Claudio

  3. #3

    Default

    that seems useful enough for me in the short term claudio, thanks for the reply!

    yes, this strikes me as something ppl are likely to want, if only because its something we immediatley realised wed need for our own product!

    wonder if its worth raining an issue in JIRA over this?


    Cheers

    Alan

  4. #4
    Join Date
    Aug 2004
    Location
    Melbourne, Australia
    Posts
    335

    Default

    wonder if its worth raining an issue in JIRA over this?
    definitely! if you could include a link to this thread that would be great.

    Ollie

  5. #5
    Join Date
    Aug 2004
    Location
    Switzerland
    Posts
    32

    Default

    Opended a JIRA issue: RCP-111

    _
    Claudio

  6. #6
    Join Date
    Sep 2004
    Location
    Ghent, Belgium
    Posts
    224

    Default

    http://opensource.atlassian.com/proj...browse/RCP-111

    has been fixed:

    see the issue for details on how to use it

    hope this helps,

    Peter

Similar Threads

  1. Problems with Text Area in Form
    By jwray in forum Swing
    Replies: 7
    Last Post: Oct 20th, 2008, 03:05 AM
  2. ShowViewCommand in ToolBar
    By afida in forum Swing
    Replies: 0
    Last Post: Oct 15th, 2004, 04:16 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •