Control Object Properties |
|
Various properties of graphical control objects in PxPlus (i.e. Button, Drop Box, Scrollbar, etc.) can be referenced and modified dynamically using a control's assigned CTL value (ctl_id) followed by the apostrophe operator and one of the associated property names.
For each graphical control object, a list of properties and their descriptions is included with the Help for the associated control directive. For example, a list of Button Properties is available by expanding the Help node for the BUTTON directive. For a list of Chart Properties, expand the Help node for the CHART directive, and so on. See Graphical Control Objects.
For quick access to the properties for a specific control type, use the links below:
|
||||
|
||||
|
||||
|
For a list of all the properties on one page (in alphabetical order), see Properties List.
Compound Properties
Color Properties
Access to control object properties is provided via the Apostrophe Operator. An apostrophe operator (tick) allows dynamic access to the properties and methods available for a given COM, OOP or graphical object. Some properties are denoted with dollar signs to indicate that they represent string values; e.g. 'Msg$ or 'Tip$.
Example:
A button's location, size, text and color would be represented by properties named Height, Font$, Text$, TextColor$, etc. If the variable MyButton contained the CTL value associated with a button, you could change its text as follows:
MyButton'Text$="Hit me now"
Other common properties include:
Property |
Description |
Column | |
Line | |
Width of the control | |
Height of the control | |
Tip for the control | |
Message line for the control | |
Format mask for the control | |
Text Color | |
Current value/state of the control |
Generally, numeric properties are type insensitive; i.e. a property such as 'Line returns (or receives) a number. If desired, you can access the same value using the property 'Line$. This is also true for string properties, assuming that they only return numeric values.
Some properties return different values based on the type of reference you make. For example, most color properties return a text description of the RGB color when accessed as a string or a 24-bit color number when accessed as a numeric.
PxPlus also supports objects that are external to PxPlus (this section does not deal with the properties (and methods) that apply to them). See Apostrophe Operator.