The SidePanel control implements a container that can be hidden or resized. A SidePanel is displayed according to the Orientation property.
Figure 18.3.1: Sidepanel application area in the Gambas IDE.
The controls labelled (1) and (2) in the Gambas IDE are 2 SidePanels with different properties for SidePanel.Orientation. In the circles you see the handles for hiding or dragging the left sidepanel as well as its tooltip text 'Project'. However, you will only see the text if the SidePanel is also displayed. The display of the object properties and the hierarchy of the objects are also embedded in a SidePanel.
Selected properties of a SidePanel are listed and described in the following table:
Property | Type | Default | Description |
---|---|---|---|
Action | String | Null | Sets or returns the action string. The action value is True if the sidepanel is visible and False if it is hidden. For a SidePanel, Action.Value returns the visibility of the SidePanel → Action[“action-string”].Value |
Border | Boolean | False | Sets a sunken border or returns the border value. |
Hidden | Boolean | False | Indicates whether the sidepanel is hidden or not. |
Orientation | Integer | 19 | Sets or returns the value of the orientation 1). (Align.Top “ 19) |
Separator | Boolean | False | Indicates whether or not a separator (light grey line) is displayed at the edge of the side panel. |
Settings | Variant[ ] | - | Returns a string or specifies the geometry of the SidePanel. This property is used by Settings.Write and Settings.Read to store and retrieve the geometry of the control. |
Transparent | Boolean | False | If SidePanel.Transparent = True, then you will only see the small arrow key when the mouse pointer is over the splitter. |
Value | Boolean | False | This property is the exact opposite of the Hidden property. |
Table 18.3.1.1: Selected properties of the SidePanel control.
In the following example, the SidePanel is displayed on the left when the programme is started (with PictureBox) and can then be hidden or shown:
Figure 18.3.3.1: Sidepanel → Show
Figure 18.3.3.1: Sidepanel → Hide
A small project showing the use of a SidePanel can be found as an archive in the download section.