Toolbar Update Logic |
Post Reply |
Author | |
cgaskill
Newbie Joined: 13 April 2006 Location: United States Status: Offline Points: 15 |
Post Options
Thanks(0)
Posted: 06 February 2008 at 1:25pm |
I am utilizing version 9.7 of the XtremeCommandBars control. Do to the number of controls and the complexity of the update logic we do not want to handle the CommandBars_Update event to perform our control enabling/disabling. I have written a routine that will find a control based upon it's ID and call the Enable method. This works fine for the Menu items; however the corresponding toolbar control (with the same ID) does not get disabled.
Is there a way to update the enable status of a control other than the Update event? |
|
ijwelch
Senior Member Joined: 20 June 2006 Status: Offline Points: 262 |
Post Options
Thanks(0)
|
Yes, you need to use Actions.
1. Call CommandBars.EnableActions 2. Add controls to CommandBars as usual 3. Add Actions to Commandbars e.g. CommandBars.Actions.Add ID_FILE_NEW,"","","","" 4. To enable control call CommandBars.Actions(ID_FILE_NEW).Enabled=True and all instances of that control id will be enabled. See also ActionsSample |
|
cgaskill
Newbie Joined: 13 April 2006 Location: United States Status: Offline Points: 15 |
Post Options
Thanks(0)
|
Unfortunately, the Actions are not available in version 9.7.
|
|
Aaron
Senior Member Joined: 29 January 2008 Status: Offline Points: 2192 |
Post Options
Thanks(0)
|
Hi, You already have a routine to enable/disable menu items, why not create a routine that finds the control in the toolbar? |
|
cgaskill
Newbie Joined: 13 April 2006 Location: United States Status: Offline Points: 15 |
Post Options
Thanks(0)
|
Okay, maybe I jumped the gun here. My routine does go thru all the command bars (menu and toolbar). But for some reason my toolbar was not being updated. I started a test app to attach to this thread and it is working as expected. So, must be in my logic that goes thru all the command bars and grabs the controls.
Sorry for the false alarm. |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |