## HideOptionalPanel

### Introduced

v5.0

### Description

Hides an optional panel. The optional panels in a layout are listed in the View > Optional Panels menu.

### Scripting Syntax

    HideOptionalPanel( Name, [All] );

### Parameters

Parameter | Type | Description
--- | --- | ---
Name | String | Name of an existing optional panel in the layout. You can use the name of the panel or the display name (the text displayed on the View > Optional Panels menu). To hide all optional panels, pass an empty string ("") with All=True. In a layout (.xsily) file, you can find optional panels by looking for elements (such as frames, switchers, and framesets) that have an "optional" attribute (the value of the "optional" attribute is the default state of the panel: hidden or visible). The name and display name of the optional panel are specified by the "name" and "displayname" attributes.
All | Boolean | True to hide all optional panels. Default Value: False

### Examples

#### 1. JScript Example

    /*

    	This example shows and hides the timerange control.

    */

    ShowOptionalPanel( "timerange" );

    HideOptionalPanel( "timerange" );

#### 2. VBScript Example

    '

    ' This example hides all the optional panels.

    '

    HideOptionalPanel "",true

### See Also

ShowOptionalPanel ToggleOptionalPanel