XTPControlHideFlags Enumeration
Description
Flags that specify why a control is hidden.
Members
| Member | Description |
|---|---|
| xtpNoHide | Control is currently visible. |
| xtpHideGeneric | Developer set Visible = False. |
| xtpHideWrap | Toolbar is too small and the control is wrapped. |
| xtpHideDockingPosition | If a toolbar has a combobox or edit control, when the toolbar is docked on the left or right side of the frame, the CommandBar ComboBox and Edit controls become hidden. |
| xtpHideScroll | There are too many controls in a popup and the control is hidden because the popup is scrolled. |
| xtpHideCustomize | User removed it. This is only possible when customization is enabled. |
| xtpHideExpand | Control is hidden because it is a hidden command set with the AddHiddenCommand option on. |
| xtpHideDocTemplate | Control is hidden because the active template is excluded from its list. |
| xtpHideRibbonTab | Control is hidden because the ribbon tab is inactive. |
Example
HideFlags Sample (Visual Basic)
This sample illustrates how to use the hide flags to determine how a control was hidden.
Private Sub cmdFindHiddenButton_Click(Index As Integer)
Dim Control as CommandBarControl
' Find the Print control
Set Control = CommandBars.FindControl(, ID_FILE_PRINT)
' If found, execute Select statement
If Not Control Is Nothing Then
' Determine why the Print button is hidden
Select Case Control.HideFlags
' Developer has hidden control with Visible = False
Case xtpHideGeneric:
MsgBox "You have hidden the Print button with Visible = False.", vbInformation, "Button Hidden"
' Toolbar docking position has hidden control
Case xtpHideDockingPosition:
MsgBox "You need to dock your toolbar to the top or bottom to see combobox or edit controls", vbInformation, "Button Hidden"
' User has hidden control
Case xtpHideCustomize:
MsgBox "You need to replace the Print button to print.", vbInformation, "Button Hidden"
' Control is hidden because it is a hidden control set with AddHiddenControl
Case xtpHideExpand:
MsgBox "You rarely use this command, so it is currently hidden until the menu is fully shown", vbInformation, "Button Hidden"
' Control is hidden because it is scrolled
Case xtpHideScroll:
MsgBox "You need to scroll the popup menu to find the Print button.", vbInformation, "Button Hidden"
' Control hidden because of toolbar wrap
Case xtpHideWrap:
MsgBox "You need to expand the toolbar to use the Print Button.", vbInformation, "Button Hidden"
' Control is not hidden
Case xtpNoHide:
MsgBox "Your button is not hidden.", vbInformation, "Button Hidden"
End Select
End If
End Sub
See Also
CommandBarControl HideFlags Property
Copyright (c) 1998-2024 Codejock Technologies. All rights reserved.