Admin Production rocket
Current Publication

UiControl

InfoConnect Desktop InfoConnect VBA Guide V17.0
Rocket® InfoConnect Desktop (formerly a product of Micro Focus or formerly a product of Open Text) documentation, created before Rocket Software acquired certain products from OpenText, may include outdated references to "Micro Focus" or "OpenText", both of which are trademarks of OpenText or its affiliates. Rocket Software is not affiliated with Micro Focus or OpenText and has since rebranded these products as Rocket® products. You may also encounter outdated links in this documentation. If you do, please contact Rocket Support (support@rocketsoftware.com) for assistance.
UiControl Object
In This Topic
Defines properties and operations on the UI control object.
Remarks
You cannot programmatically add controls. If you know the control ID, you can hide, show, and remap the control.
Example
This example illustrates how to use a recursive function to enumerate all the UiControl objects that make up the InfoConnect Ribbon. It prints the id value of each UiControl object to the "immediate" pane in the Visual Basic editor.
Public Sub EnumerateUIControls()
Dim controls() As UiControl
Dim ctrlContainer As UiControlContainer
Dim i As Long
controls = ThisView.UiMode.SubItems
 
For i = 0 To UBound(controls)
Debug.Print controls(i).id
 
Set ctrlContainer = controls(i)
RecurseSubItems ctrlContainer.SubItems
Next
 
End Sub
 
Private Sub RecurseSubItems(ctrls() As UiControl)
Dim container As UiControlContainer
Dim i As Long
 
If UBound(ctrls) >= 0 Then
For i = 0 To UBound(ctrls)
 
Debug.Print ctrls(i).id
 
On Error Resume Next
Set container = ctrls(i)
If Err = 0 Then
RecurseSubItems container.SubItems
Else
Err.Clear
End If
Next
End If
End Sub
See Also