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

listed all the controls

 Post Reply Post Reply
Author
Message
RedPsyrus View Drop Down
Groupie
Groupie
Avatar

Joined: 17 November 2008
Status: Offline
Points: 38
Post Options Post Options   Thanks (0) Thanks(0)   Quote RedPsyrus Quote  Post ReplyReply Direct Link To This Post Topic: listed all the controls
    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
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: 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
Back to Top
RedPsyrus View Drop Down
Groupie
Groupie
Avatar

Joined: 17 November 2008
Status: Offline
Points: 38
Post Options Post Options   Thanks (0) Thanks(0)   Quote RedPsyrus Quote  Post ReplyReply Direct Link To This Post 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
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: 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
Back to Top
RedPsyrus View Drop Down
Groupie
Groupie
Avatar

Joined: 17 November 2008
Status: Offline
Points: 38
Post Options Post Options   Thanks (0) Thanks(0)   Quote RedPsyrus Quote  Post ReplyReply Direct Link To This Post Posted: 16 April 2009 at 4:03am
Thanks Oleg ...

It done

I'm using visual studio 2008 pro and codejock 12.1.1
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.173 seconds.