Change Text of Toolbar button [message #509451] |
Fri, 22 January 2010 13:26 |
|
Hey all,
i have the following problem: I have a view and added some buttons to the toolbar of the view. Now i want that the text of the buttons changing when the button was pressed, i.e. the text of the button is "login" and after pressing the button, the text should be "logout". I tried to use the IElementupdater, but i have the problem that my button is disappearing when i press it. I also added the Command to my Filemenu, there it works properly. What can i do? Here is the simple Handler code:
public class TestHandler extends AbstractHandler implements IElementUpdater {
@Override
public Object execute( ExecutionEvent event) throws ExecutionException {
System.out.println("TestHandler.execute()");
return null;
}
@Override
public void updateElement( UIElement element, Map parameters) {
element.setText("Another text");
}
}
Thanks a lot.
Thomas
|
|
|
|
|
|
Re: Change Text of Toolbar button [message #510305 is a reply to message #510072] |
Wed, 27 January 2010 08:03 |
|
Hi Paul,
thanks again for your answer, i already used the code you´ve mentioned, and until now it works proper and bug-free
It is a little bit unbeautiful, that the size of the button changes, but we can live with that fact.
Thanks + have a great day,
Thomas
|
|
|
Powered by
FUDForum. Page generated in 0.04310 seconds