Announcement Announcement Module
Collapse
No announcement yet.
Text AND icon in toolbar? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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
    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

    Comment


    • #3
      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

      Comment


      • #4
        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

        Comment


        • #5
          Opended a JIRA issue: RCP-111

          _
          Claudio

          Comment


          • #6
            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

            Comment

            Working...
            X