Print Page | Close Window

Iterating thru controls

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=5738
Printed Date: 20 June 2025 at 1:28am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Iterating thru controls
Posted By: Shawshank
Subject: Iterating thru controls
Date Posted: 10 December 2006 at 12:35pm
I have a command bar that contains a CommandBarControl of the type xtpControlButtonPopup. This CommandBarControl has four child controls. I'm attempting to iterate through these child controls so I can set each one's checked property to false:
 
    Set Cntrl = DGT2.CommndBars.FindControl(, ID_TOOLBAR_FILTER)
   
    For Each c In Cntrl.Controls
   
        c.Checked = False
       
    Next c
This doesn't work. The control c is simply a sister control of Cntrl and not the child control I was attempting to get at. How would one iterate through the child controls of Cntrl?



Replies:
Posted By: Oleg
Date Posted: 10 December 2006 at 2:29pm
hi,
Cntrl.CommandBar.Controls


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: Shawshank
Date Posted: 10 December 2006 at 7:14pm
That property does not exist for me. I have Cntrl.Controls but no Cntrl.CommandBar.Controls.
 
My code is:
 
    Set Cntrl = DGT2.CommndBars.FindControl(, ID_TOOLBAR_FILTER)
    
     For Each c In Cntrl.Controls
   
        c.Checked = False
       
    Next c
Like I stated, Cntrl is a button on a CommandBar with child buttons. See original post.
 
Thanks.


Posted By: Oleg
Date Posted: 11 December 2006 at 12:44am
Hi,
to see CommandBar property in IDE you have to declare Cntrl  as CommandBarPopup. (because type is xtpControlButtonPopup)


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: Shawshank
Date Posted: 11 December 2006 at 12:53pm
Thanks!



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