Visible: Boolean;
The Visible property determines whether the panel is visible.
Available values:
True. Default. The panel is displayed on the ribbon.
False. The panel is not displayed on the ribbon.
Executing the example requires a form with components:
Button. A button named Button1 to hide the panel on the ribbon.
Ribbon. A component named Ribbon1 to create a ribbon by means of ribbon editor.
NOTE. When creating a component, a resource selection dialog box opens. Select the Resources empty object for the component, which will store graphic resources of ribbon elements.
Form ribbon structure in the ribbon editor:
Add a category.
Add three panels.
Add a button to the second panel.
After executing the operations, the ribbon editor displays the following ribbon structure:
After components are added, the form looks as follows:
Add a link to the Forms system assembly.
The example is a handler of the OnClick event for the component named Button1.
Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Begin
If (RibbonPanel2.Visible = True) Then
RibbonPanel2.Visible := False;
Else
RibbonPanel2.Visible := True;
End If;
End Sub Button1OnClick;
After executing the example, clicking the Button1 button hides the second panel on the ribbon:
The second click on the Button1 button displays the second panel on the ribbon.
See also: