Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Command Bars
  New Posts New Posts RSS Feed - Setting checked status of checkbox menu item
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Setting checked status of checkbox menu item

 Post Reply Post Reply
Author
Message
stefanadelbert View Drop Down
Groupie
Groupie


Joined: 29 October 2008
Location: Australia
Status: Offline
Points: 31
Post Options Post Options   Thanks (0) Thanks(0)   Quote stefanadelbert Quote  Post ReplyReply Direct Link To This Post Topic: Setting checked status of checkbox menu item
    Posted: 31 October 2008 at 1:11am
In VB6, I've created an Xtreme menu and added a checkbox menu item to one of the items

AddControl .Controls, xtpControlCheckBox, ID_VIEW_STATUSBAR, ""

Where ID_VIEW_STATUSBAR is a global constant.

In code I want to set the checkbox status/value/checked property. I've tried a number of  different approaches (see below), but with no luck (Object variable of with block variable not set).

  • CommandBar.FindControl(ID_VIEW_STATUSBAR).checked = True
  • CommandBar.ActiveMenuBar.FindControl(ID_VIEW_STATUSBAR).checked = True
  • CommandBar.ActiveMenuBar.Controls.Find(ID_VIEW_STATUSBAR).CHECKED = True
How is this meant to be done?

Thanks
Stefan
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 31 October 2008 at 9:08am

Hi,

Set last "Recurse" parameter to True.
.. but I don't recomment use FindControl. Use update handlers like all our samples.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
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.172 seconds.