Home | Index classes | Index static functions | Index enumerations | Index structure types |
CLASS {Control|_on_form} , ABSTRACT, DESTRUCTORS, UNTESTED :
{Control} is the common prototype of any visual or non-visual component placed on a form. All the components are placed in form columns. For columns its disposition is specified (left, right, top, bottom, center). Visual components are usually placed from top to bottom (or from left to right - for top / bottom aligned columns). Usually one component is occupying a row, but sometimes two components are placed together in a row (if the first is a label and the second does not require entire column width and the label size is suffitiently small to fit both components in a single row). Component events are handled in a parent form methods (like click, change, mouse_move etc.)
IMPORT : {Geometry} .
{Form} Form_|parent_ , INIT
A reference to a parent form.
STR Alias|_of_control , INIT
String Alias, which can be used to identify sender controls while handling events like mouse move, press, keyboard, or change text in an {Edit} control.
INT Handle|_control_native , READ
A control native handle used to associate an AL-IV control with the native component implementing it on a certain target.
STR Parent_column|_on_form , READ
|
Left coordinate of the top-left point relative to the parent column, in points. |
|
Setting left coordinate to a certain value. This has no permanent results except auto-arrange was cancelled for the column (the method {Form}.Set_column_auto_arrange with the FALSE as the parameter). |
|
Y coordinate of the top-left point relative to the parent column, in points. |
|
Setting top coordinate to a certain value. This has no permanent results except auto-arrange was cancelled for the column (the method {Form}.Set_column_auto_arrange with the FALSE as the parameter). |
|
Setting a certain top and left coordinate for the control. This has no permanent results except auto-arrange was cancelled for the column (the method {Form}.Set_column_auto_arrange with the FALSE as the parameter). |
|
The control top and left coordinates relatively to the parent form client area. |
|
The visual control width in points |
|
Setting a certain width for the control. This has no permanent results except the parent column is top or bottom aligned or auto-arrange was cancelled for the column. |
|
The visual control height in points |
|
Setting a certain height for the control. |
|
Setting a certain size for the control. This has no permanent results for width except the parent column is top or bottom aligned or auto-arrange was cancelled for the column. The value -1 means that the correspondent coordinate |
|
The visual control bounds rectangle relative to the parent form client area. |
BOOL Can_anchor_bottom|_right , READ
TRUE, if the control allows setting the Anchor_bottom property (such as {Memo}, {Listbox}, {Paintbox} and its descendants).
BOOL Anchor_bottom|_right_only_edit_memo_combo_paintbox , READ
TRUE, if the control is anchored (expanded) bottom. This should be the last (bottom) visual control in the parent column (aligned left, right or center).
|
Setting value of the Anchor_bottom property (applicable only to controls which Can_anchor_bottom property is TRUE). |
It is not necessary to use these low level methods directly, instead form events hidden / disabled should be used to define conditions at which certain components become invisible / grayed. Desired components also should be placed into correspondent form's arrays grayable[ ] / can_hide[ ], otherwise these always will be visible / enabled.
|
TRUE if the control is not visible on its form. To control if the control is hidden on form, it is necessary to override the method hidden of the form. |
| |
|
TRUE if the control is disabled (grayed). To control the disabled property of a control it is necessary to override the nmethod hidden of the parent form. |
|
BOOL Wrap|_text , READ
TRUE if the control is wrapable.
|
Getting item text. Applicable for controls having items, like {Listbox}, {Memo}. |
|
Setting item text. Applicable for controls having items, like {Listbox}, {Memo}. |
|
Count of items. Applicable for controls having items, like {Listbox}, {Memo}. |
|
Count of columns. Applicable for controls having subitems, like {Paint_table}. |
|
Clear items. Applicable for controls having items, like {Listbox}, {Memo}, {Paint_lines}, {Paint_table}. |
INT Foreground|_color
Foreground color (used usually to draw text). On certain platforms this property can be ignored for some kinds of controls. E.g., for {Button} on Windows.
|
Setting foreground color for the control. |
INT Background|_color
Background color (used usually to fill the background).
|
Setting background color for the control. |
BOOL Custom_background|_when_set_at_least_one_set_to_TRUE
|
Getting name of the font face for the control. |
|
Setting name of the font face for the control. |
|
Getting size of the font (in points) for the control. |
|
Setting the size of the font for the control. |
|
Getting the font style for the control as a string (B- Bold, I- Italic etc.). |
|
Setting the font style for the control as a string (B- Bold, I- Italic etc.). |
|
Setting the font name, size and style for the control at once. |
|
Returns TRUE for the control if it is sized automatically. This method should be overridden in a control implementation. It is used in a form auto-arrange procedure to arrange controls in its columns. |
|
|