Class XbpSetting() Foundation

Class function of the XbpSetting class.


The XbpSetting class is an abstract class that provides the mechanisms for Xbase Parts that are "toggles". These are dialog elements that allow a selection between two or more states or conditions. At any point in time, these Xbase Parts are in one of the available states. XbpSetting is derived from the XbpWindow and DataRef classes and can react to events as well as manage the screen and data. The specific type of toggle is uniquely defined in a subclass. This means that the XbpSetting class is an abstract class and no instances of it can be created.

The current toggle status is stored in the edit buffer. The data type of the stored value depends on how many available states the toggle has (two or more than two). If only two states are available, the stored value is a logical, otherwise it is a numeric value. The user switches between the available toggle states using the left mouse click or the space bar. After the value is changed, the :selected() callback method is executed and the callback code block is evaluated if one is contained in the instance variable :selected. The current value in the edit buffer is set in a method or in a code block called by the method :getData(). The latter is recommended and executes the data code block assigned to the instance variable :dataLink.

When a user defined dialog element is defined that uses the functionality of the XbpSetting class, a separate class that determines the type of dialog element must be used as the superclass. For example, XbpCheckBox or XbpRadioButton could be used as the superclass. Inheriting directly from the XbpSetting class, such as a class declaration in the form CLASS xyz FROM XbpSetting, is not allowed.


The instance variables in this group configure system resources. If changes are made to these values, they must either be made before the :create() method is executed or the :configure() method must be used to activate the changes.

Automatically fits the size of the toggle to the caption.
The caption of the XbpSetting object.
Indicates whether the toggle receives input focus when the mouse is clicked on it.
The state of the XbpSetting object.
Life cycle
Initializes instance variables for the XbpSetting object.
Requests system resources for the XbpSetting objects.
Reconfigures the XbpSetting object after :create() has been executed.
Releases the system resources of the XbpSetting object.
Returns the value in the edit buffer of the toggle.
Returns the current state of the toggle.
Specifies a new caption.
Sets the current value or state of the toggle.
Toggle has been selected.

If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.