HideFlags Property
Description
Retrieves the HideFlags of the control.
Property Type
Read-write property
Syntax (Visual Basic)
Public Property HideFlags() As [XTPControlHideFlags](XtremeCommandBars~Enumerations~XTPControlHideFlags_EN.md)
Remarks
HideFlags will tell how a control was hidden if it is hidden or why it is not visible. Most of these flags are read-only and should not be set by the developer.
There is only one situation where you should set these flags manually. The xtpHideCustomize is the only flag that should ever be manually set. You would do this when you want the control to initially be hidden but still exist in the customize popup of the toolbar. This will cause the control to appear in the Add and Remove Buttons popup without a check mark indicating that it is currently hidden. This flag will automatically be set when a command is hidden this way.
HideFlag Value Reason Control is Hidden
| Value | Description |
|---|---|
| 0 | Control is currently visible. |
| 1 | Developer set. |
| 2 | Toolbar is too small and the control is wrapped. |
| 4 | 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. |
| 8 | There are too many controls in a popup and the control is hidden because the popup is scrolled. |
| 16 | User removed it. This is only possible when customization is enabled. |
| 32 | If the control is rarely used and it is not visible because the intelligent menus option is on and the command is a hidden command. |
Example
HideFlags Sample (Visual Basic)
This sample illustrates how to use the HideFlags 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
Copyright (c) 1998-2024 Codejock Technologies. All rights reserved.