Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Command Bars
  New Posts New Posts RSS Feed - Updating buttons with same id
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Updating buttons with same id

 Post Reply Post Reply
Author
Message
John31 View Drop Down
Groupie
Groupie
Avatar

Joined: 08 December 2005
Location: United States
Status: Offline
Points: 70
Post Options Post Options   Thanks (0) Thanks(0)   Quote John31 Quote  Post ReplyReply Direct Link To This Post Topic: Updating buttons with same id
    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
Back to Top
SuperMario View Drop Down
Admin Group
Admin Group
Avatar

Joined: 14 February 2004
Status: Offline
Points: 18057
Post Options Post Options   Thanks (0) Thanks(0)   Quote SuperMario Quote  Post ReplyReply Direct Link To This Post 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)
Back to Top
John31 View Drop Down
Groupie
Groupie
Avatar

Joined: 08 December 2005
Location: United States
Status: Offline
Points: 70
Post Options Post Options   Thanks (0) Thanks(0)   Quote John31 Quote  Post ReplyReply Direct Link To This Post Posted: 03 February 2006 at 8:10am
Thanks for quick response.  Much easier although I had already done the search thing. 
Regards

John Layton
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.156 seconds.