Table of Contents
18.3 SidePanel (gb.qt4)
The SidePanel control implements a container that can be hidden or resized. A SidePanel is displayed according to the Orientation property.
- A SidePanel is shown or hidden when the user clicks on one of the two small arrow buttons on its border. However, you will only see the small arrow keys if the property SidePanel.Transparent has the value False.
- A SidePanel is continuously resized when the user clicks on the border between the buttons and moves the mouse with the mouse button pressed.
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.
18.3.1 SidePanel properties
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.
18.3.2 Events SidePanel
- Hide: The event is triggered after the SidePanel has been hidden.
- Show: The event is triggered just before the SidePanel is displayed.
- Resize: The event is triggered when the SidePanel is resized.
18.3.3 Example
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.



