Skip to content

RestoreLayout - cCJCommandBarSystem

Restores the menus and toolbars back to their initial configuration

Type: Procedure

Syntax

Procedure RestoreLayout

Call Example

Send RestoreLayout

Description

RestoreLayout can be called to restore the commandbar system back to its original design time configuration. The design time configuration is the setup that is determined by your source code. Any customizations made by the end user (e.g. hiding toolbars, moving toolbars, moving and creating new menu items) are discarded and the "factory defaults" as determied by the programmer are restored.

The cCJRestoreMenusMenuItem class can be used to restore your layout. It calls this method.

{ OverrideProperty=psCaption InitialValue=C_$CaptionRestoreMenus }
{ OverrideProperty=psToolTip InitialValue=C_$ToolTipRestoreMenus }
{ OverrideProperty=psDescription InitialValue=C_$DescRestoreMenus }
Class cCJRestoreMenusMenuItem is a cCJMenuItem

    Procedure Construct_Object
        Forward Send Construct_Object
        Set psCaption to C_$CaptionRestoreMenus
        Set psToolTip to C_$ToolTipRestoreMenus
        Set psDescription to C_$DescRestoreMenus
    End_Procedure

    Procedure OnExecute Variant vCommandBarControl
        Handle hoCommandBars
        Get CommandBarSystemObject to hoCommandBars
        Send RestoreLayout of hoCommandBars
    End_Procedure

End_Class