Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » Setting new text for toggle command hides other command on view toolbar
Setting new text for toggle command hides other command on view toolbar [message #496239] Mon, 09 November 2009 07:49 Go to next message
Eclipse UserFriend
It's a little weird and I wonder if any one else has come across such a behavior.

I have placed 5 commands on a view's toolbar.
First of them is a toggle command.
When user would press this toggle command I change its text to 'Turn On' or 'Turn Off' based on it's new state.
In the case of text appearing 'Turn Off' ie when the toggle button is in 'pressed' state, last of the commands disappears from the toolbar. As if it didn't get enough space on the toolbar.
When the toggle command goes back in (new toggle text : 'Turn On') the disappeared command again appears.

Do I have to set default size or something for each of the commands?
How do I go about solving this problem?

Thanks.
Re: Setting new text for toggle command hides other command on view toolbar [message #496827 is a reply to message #496239] Wed, 11 November 2009 09:02 Go to previous messageGo to next message
Eclipse UserFriend
I believe it's a layout problem, https://bugs.eclipse.org/bugs/show_bug.cgi?id=97522

PW
Re: Setting new text for toggle command hides other command on view toolbar [message #504974 is a reply to message #496239] Wed, 23 December 2009 16:46 Go to previous message
Eclipse UserFriend
I ran into this problem myself and as a workaround, whenever I change the text of a button on the view toolbar, I grab the view's toolbar manager and call update(true) on it, forcing it to redraw.

Hope it helps.
Previous Topic:code review tool for all editors?
Next Topic:logging for org.eclipse.ui.menus extension and for the platform's handling of menus added by this?
Goto Forum:
  


Current Time: Wed Jul 23 19:31:43 EDT 2025

Powered by FUDForum. Page generated in 0.23515 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top