Print Page | Close Window

listed all the 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=14016
Printed Date: 07 October 2024 at 2:32am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: listed all the controls
Posted By: RedPsyrus
Subject: listed all the controls
Date Posted: 14 April 2009 at 7:14pm
Hi..
I create a RibbonBar with a lot control.. and multiple type of controls, when  i try to list all the controls in a list box or in combobox there is some controls
not show..(the controls in the xtpControlPopup are not show)
is there a nother way to list all the controls..?!
I use this code

               Dim Control As XtremeCommandBars.CommandBarControl

                        For Each Control In CommandBars.Controls
           
                              list1. additem (control.caption)
       
                        next control

thanks



-------------
I'm using visual studio 2008 pro and codejock 12.1.1



Replies:
Posted By: Oleg
Date Posted: 15 April 2009 at 1:51am
Hi,
 
Why this code have to add all controls from xtpControlPopup  ? :)
 
You need check if control has type xtpControlPopup  and call recursively method for Control.CommandBar.Controls


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


Posted By: RedPsyrus
Date Posted: 15 April 2009 at 2:38pm
hi oleg

I do this but there is an exception..

                For Each Control In RibbonBar.Controls

                    Select Case Control.Type

                        Case XtremeCommandBars.XTPControlType.xtpControlButton

                          'Some code

                        Case XtremeCommandBars.XTPControlType.xtpControlPopup

                            dim PopUpControl As XtremeCommandBars.CommandBarControl

                                        For Each PopUpControl In Control.CommandBar.Controls   'Exception
           
                                              list1. additem (control.caption)
      
                                            next PopUpControl

                    End Select

        next Control

can you tell me what I can do please

thanks
 

-------------
I'm using visual studio 2008 pro and codejock 12.1.1


Posted By: Oleg
Date Posted: 16 April 2009 at 1:48am
Replace to

Dim Control As XtremeCommandBars.CommandBarControl

For Each Control In RibbonBar.Controls

'Some code

Debug.Print(Control.Caption)

Debug.Print(Control.Type)

If (Control.Type = XtremeCommandBars.XTPControlType.xtpControlPopup) Then

If Not Control.CommandBar Is Nothing Then

Dim PopUpControl As XtremeCommandBars.CommandBarControl

For Each PopUpControl In Control.CommandBar.Controls 'Exception

'list1.additem(Control.caption)

Next PopUpControl

End If

End If

Next Control



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


Posted By: RedPsyrus
Date Posted: 16 April 2009 at 4:03am
Thanks Oleg ...

It done



-------------
I'm using visual studio 2008 pro and codejock 12.1.1



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