| Control Object Properties |
|
| Various properties of Graphical Control Objects in ProvideX (button, drop box, scrollbar ...) can be referenced and modified dynamically using a controls assigned CTL value (ctl_id) followed by the apostrophe operator and one of the associated property names (listed above). This chapter describes the various properties and discusses how they are used to define controls in ProvideX. | ||
| *Note* | In this reference, some properties are denoted with dollar signs to indicate that they represent string values; e.g., 'Msg$ or 'Tip$. | |
| For a complete list of graphical control objects and their properties, see Graphical Control Objects. The Properties List, provides a complete alphabetically- arranged list of valid property names and their definitions. Special property groupings (e.g., state indicators or multi-property access) are described in the section Compound Properties. | ||
| Using Property Names | As
mentioned earlier, access to control object properties is
provided via the apostrophe operator. (For complete
syntax and usage refer to the Apostrophe Operator). For example, a button location, size, text, and colour would be represented by properties named Height, Font$, Text$, TextColour$, 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: |
|
| 'Col | Column | |
| 'Line | Line | |
| 'Cols | Width of the control | |
| 'Lines | Height of the control | |
| 'Tip$ | Tip for the control | |
| 'Msg$ | Message line for the control | |
| 'Fmt$ | Format mask for control | |
| 'TextColour$ | Text Colour | |
| 'Value$ | Current value/state of control. | |
| *Note* | While programs can access or update property values, properties cannot be specified as the target for any file I/O or CALL parameter lists. | |
| 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 colour properties return a text description of the RGB colour when accessed as a string, or a 24-bit colour number when accessed as a numeric. ProvideX also supports objects that are external to ProvideX this chapter does not deal with the properties (and methods) that apply to them. COM and OOP objects/controls are described under the Apostrophe Operator. |
||