Print Page | Close Window

Updating buttons with same id

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=3594
Printed Date: 21 June 2025 at 3:40pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Updating buttons with same id
Posted By: John31
Subject: Updating buttons with same id
Date Posted: 03 February 2006 at 7:46am

Not sure what I am doing wrong, but I think this should work.

I have a menu item called Actions, in this menu there is a button with ID_CALL, On the toolbar I also have a button with ID_CALL.  In code when I findcontrol ID_CALL and set enable to false only the button on the toolbar is changed.  If I click the actions menu the ID_CALL button is still enabled. 

What am I missing.

 

 

 



-------------
Regards

John Layton



Replies:
Posted By: SuperMario
Date Posted: 03 February 2006 at 7:54am
Do this in the Update event, this way it will be called for both instances of the control.  If not, then you have to search for both instances and enable\disable both.

Case ID_CALL:
    Control.Enabled = IIF(SOME_BOOL_EXPRESSION, True, False)


Posted By: John31
Date Posted: 03 February 2006 at 8:10am
Thanks for quick response.  Much easier although I had already done the search thing. 

-------------
Regards

John Layton



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