Print Page | Close Window

Toolbar Update Logic

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Command Bars
Forum Description: Topics Related to Codejock Command Bars
URL: http://forum.codejock.com/forum_posts.asp?TID=9516
Printed Date: 08 October 2024 at 10:51am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Toolbar Update Logic
Posted By: cgaskill
Subject: Toolbar Update Logic
Date 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?



Replies:
Posted By: ijwelch
Date Posted: 06 February 2008 at 8:37pm
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


Posted By: cgaskill
Date Posted: 06 February 2008 at 9:23pm
Unfortunately, the Actions are not available in version 9.7.


Posted By: Aaron
Date Posted: 06 February 2008 at 9:40pm

Hi,

You already have a routine to enable/disable menu items, why not create a routine that finds the control in the toolbar?



Posted By: cgaskill
Date Posted: 07 February 2008 at 9:32am
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.



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net