Forum
Please
Log In
to post a new message or reply to an existing one. If you are not registered, please
register.
NOTE: Some forums may be read-only if you are not currently subscribed to
our technical support services.
Subject |
Author |
Date |
|
Gunter Avenius
|
Feb 9, 2008 - 5:51 AM
|
Hello,
i want list all Controls on a RibbonCroup (in vb2005)
i use:
For Each Ribbonctl In RibbonGroup.Controls Me.lstControls.Items.Add(Ribbonctl.Name) Next Ribbonctl
this works. But it works not when a ButtonGroup is avalible in the RibbonGroup.
How can i get a List with all Controls in a RibbonCroup (with all ButtonGroups and all Controls in the ButtonGroup)
Thanks and best regards Gunter
|
|
Gunter Avenius
|
Feb 11, 2008 - 5:21 AM
|
|
|
Technical Support
|
Feb 11, 2008 - 4:43 AM
|
Here is the code that should allow you to do that For Each control As System.Windows.Forms.Control In ribbonGroup.Controls
Dim buttonGroup As ButtonGroup = TryCast(control, ButtonGroup)
If buttonGroup IsNot Nothing Then
For Each buttonGroupControl As Control In buttonGroup.Controls
’ Use buttonGroupControl here.
Next buttonGroupControl
End If
’ Use control here.
Next control
|
|