User Tools

Site Tools


k18:k18.2:start

18.2 Panel

The Panel component is a container for other components whose border can be changed in various ways. The classes HBox, VBox, HPanel and VPanel are also panels that are initialised with different arrangement values.

18.2.1 Properties Panel

You control the type of border on a panel using the Panel.Border property. Other properties of a panel can be found in the following table:

PanelData typeDefaultDescription
.ArrangementInteger0Determines or sets how components are arranged on the panel. See the Arrange class → Chapter 20.7.2 for a list of constants for this property.
.BorderInteger0Sets or returns the type of border to be displayed. In the Border class → Chapter 23.2.1 you will find a list of constants for this property.
.IndentBooleanFalseDetermines or sets whether the components in the container panel are indented. The indentation depth is Desktop.Scale Pixel.
.InvertBooleanFalseDetermines or sets the value to True if the horizontal or vertical arrangement is inverted.

Table 18.2.1.1: Selected Panel Properties

The Margin, Padding and Spacing properties have been described in detail in chapter '18.0 Containers'.

18.2.2 Examples of panel use

One field of use for a panel arises in connection with the use of (at least) two RadioButtons to form groups of RadioButtons → Chapter 16.18 RadioButton.

A panel is also well suited to be used, for example, in an HBox as a dynamic spacer (Panel1.Expand = True):

B1

Figure 18.2.2.1: Panel as a dynamic element

The StatusBar class by Raymond de Bruijne (http://gambas-club.de/viewtopic.php?f=4&t=2928) relies on individual panels for the construction of a StatusBar, where each panel can be formatted in a particular way depending on the display purpose:

B2

Figure 18.2.2.2: Four panels in a StatusBar

Download

Projects

Download

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.2/start.txt · Last modified: 08.10.2023 by emma

Page Tools