![]() |
Iterating thru controls |
Post Reply
|
| Author | |
Shawshank
Senior Member
Joined: 16 October 2005 Status: Offline Points: 117 |
Post Options
Thanks(0)
Quote Reply
Topic: Iterating thru controlsPosted: 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?
|
|
![]() |
|
Oleg
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
Posted: 10 December 2006 at 2:29pm |
|
hi,
Cntrl.CommandBar.Controls
|
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
Shawshank
Senior Member
Joined: 16 October 2005 Status: Offline Points: 117 |
Post Options
Thanks(0)
Quote Reply
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.
|
|
![]() |
|
Oleg
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
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 |
|
![]() |
|
Shawshank
Senior Member
Joined: 16 October 2005 Status: Offline Points: 117 |
Post Options
Thanks(0)
Quote Reply
Posted: 11 December 2006 at 12:53pm |
|
Thanks!
|
|
![]() |
|
Post Reply
|
|
|
Tweet
|
| Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |