Print Page | Close Window

Setting checked status of checkbox menu item

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=12576
Printed Date: 07 October 2024 at 10:23am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Setting checked status of checkbox menu item
Posted By: stefanadelbert
Subject: Setting checked status of checkbox menu item
Date 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



Replies:
Posted By: Oleg
Date 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



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