User Tools

Site Tools


k18:k18.3:start

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.

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

  • 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:

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
The website uses a temporary session cookie. This technically necessary cookie is deleted when the browser is closed. You can find information on cookies in our privacy policy.
k18/k18.3/start.txt · Last modified: 07.10.2023 by emma

Page Tools