Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Command Bars
  New Posts New Posts RSS Feed - Iterating thru controls
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Iterating thru controls

 Post Reply Post Reply
Author
Message
Shawshank View Drop Down
Senior Member
Senior Member


Joined: 16 October 2005
Status: Offline
Points: 117
Post Options Post Options   Thanks (0) Thanks(0)   Quote Shawshank Quote  Post ReplyReply Direct Link To This Post Topic: Iterating thru controls
    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?
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: 10 December 2006 at 2:29pm
hi,
Cntrl.CommandBar.Controls
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
Shawshank View Drop Down
Senior Member
Senior Member


Joined: 16 October 2005
Status: Offline
Points: 117
Post Options Post Options   Thanks (0) Thanks(0)   Quote Shawshank Quote  Post ReplyReply Direct Link To This Post 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.
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: 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
Back to Top
Shawshank View Drop Down
Senior Member
Senior Member


Joined: 16 October 2005
Status: Offline
Points: 117
Post Options Post Options   Thanks (0) Thanks(0)   Quote Shawshank Quote  Post ReplyReply Direct Link To This Post Posted: 11 December 2006 at 12:53pm
Thanks!
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.031 seconds.