Announcement Announcement Module
Collapse
No announcement yet.
getActiveWindow().getToolBar() add/remove items dynamic ? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • getActiveWindow().getToolBar() add/remove items dynamic ?

    Hello

    I'm trying to add new items to the getActiveWindow().getToolBar() on the fly like:

    Code:
    public void doExecuteCommand() {
      CommandGroup tb = Application.instance()
    				.getActiveWindow().getToolBar();
      tb.add(new ActionCommand("helloWorld") {
    	public void doExecuteCommand() {
    	}
       }, true);
    }
    but nothing appears in the toolbar.

    In AbstractApplicationWindow there is a createToolBarControl() but there is no event wireing between the createToolBarControl and the getToolBarCommandGroup().

    Should I extend DefaultApplicationWindow and make it listen for changes in getToolBarCommandGroup() and rebuild/replace the createToolBarControl() on changes ?

    BR
    Carsten
Working...
X