Professional UI Solutions
Site Map   /  Register


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.

Forums » Elegant Ribbon Tech Support » Loop Ribbon Groups and set visible=true by code Collapse All
Subject Author Date
Milan Hudec Nov 14, 2017 - 4:46 PM

I looking for universal code for set visible= true or false for ribbon selected tab group.

I have tab with N groups with Tag=[integer] and
a have listbox with some string and when i click on the selected item in listbox
a wanna get listindex, then loop group and set grp visible=true if listboxintex=group tag?

For DiagramType As Integer = 0 To ListView1.SelectedItems.Count - 1

if ListView1.SelectedIndices(DiagramType)) = ??? Ribbon1.ContextualTabGroups.Tag???
end if


Is there some elegant ribbon sample code?

Milan Hudec Nov 16, 2017 - 2:19 PM

For DiagramType As Integer = 0 To ListView1.SelectedItems.Count - 1

Me.Text = ListView1.SelectedItems.Item(DiagramType).Text

For Each control As RibbonGroup In RibbonTabPage1.Controls

If control.Tag = ListView1.SelectedIndices(DiagramType).ToString Then
control.Visible = True
control.Visible = False
End If

Next control