View Full Version : Modify window menu/toolbar/statusbar
Patrick Vanhuyse
Sep 30th, 2004, 03:16 AM
1. Is it possible to add commands to menu and/or toolbar when a view is activated and to remove them when the view is closed ?
I don't want general command which are greyed. I want to add menu, sub-menus in existing ones and toolbar commands.
2. Is it possible to change the statusbar when a view is activated ? When I try to change it in setGlobalCommand..., I get a NullPointerException.
I think that listener should be added to follow the view lifecycle.
Thanks
Patrick
Keith Donald
Oct 1st, 2004, 11:03 AM
1. the command API certainy supports such reconfiguration - have you tried registering a custom view listener with the application page? That should work, though I will look at ways to make this easier.
2. What do you want to do with the status bar when the view is activated? It is possible to set the text, and there are some base capabilities for adding commands to the status bar (but aren't yet well developed)
Patrick Vanhuyse
Oct 4th, 2004, 05:36 AM
Registering a view listener with the application would be fine but I don't see where I can do that. It seems there is no access to the application page in the application window. Wouldn't it be a good idea to allow to add a listener to a view in the configuration files (in the ViewDescriptor for example) ?
I want to access to the ProgressMonitor capabilities of the StatusBar. When I use getStatusBar (AbstractView or ApplicationWindow), I get a StatusBarCommander wich doesn't give access to these capabilities and which doesn't give acces to StatusBar (protected getStatusBar()). I think giving public access to getStatusBar in StatusBarCommander will solve this problem.
Patrick Vanhuyse
Oct 12th, 2004, 03:43 AM
Is there somebody here ?
Need some help with my last post in this thread.
:(
Keith Donald
Oct 12th, 2004, 12:09 PM
Patrick,
Give it a try now with statusBarCommandGroup.getProgressMonitor()
MjH
Jul 18th, 2005, 10:07 PM
Registering a view listener with the application would be fine but I don't see where I can do that. It seems there is no access to the application page in the application window. Wouldn't it be a good idea to allow to add a listener to a view in the configuration files (in the ViewDescriptor for example) ?
Patrick, did you figure out how to do this (assuming you're still around)? I am looking to do the same thing (add menus/menu items that are specific to a View to the menubar), and I am unable to figure out how this would be done.
Thanks.
vBulletin® v3.7.3, Copyright ©2000-2008, Jelsoft Enterprises Ltd.