Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    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 12:49 Go to next message
Prasanna K is currently offline Prasanna KFriend
Messages: 78
Registered: July 2009
Member
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 14:02 Go to previous messageGo to next message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

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 21:46 Go to previous message
Joe G is currently offline Joe GFriend
Messages: 1
Registered: December 2009
Junior Member
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: Thu Mar 28 22:35:18 GMT 2024

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

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

Back to the top