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.

BILD 1

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:

PropertyTypeDefaultDescription
ActionStringNullSets 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
BorderBooleanFalseSets a sunken border or returns the border value.
HiddenBooleanFalseIndicates whether the sidepanel is hidden or not.
OrientationInteger19Sets or returns the value of the orientation 1). (Align.Top “ 19)
SeparatorBooleanFalseIndicates whether or not a separator (light grey line) is displayed at the edge of the side panel.
SettingsVariant[ ]-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.
TransparentBooleanFalseIf SidePanel.Transparent = True, then you will only see the small arrow key when the mouse pointer is over the splitter.
ValueBooleanFalseThis 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

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:

BILD 2

Figure 18.3.3.1: Sidepanel → Show

BILD 3

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.

Download

1) top (default), right, bottom, left