Form¶
Form is derived from Window class.
[lide.base] ^1.0lide.classes.file 1.0A form is a window or screen that contains numerous controls, or fields to enter data.
Constructor¶
Form class has a complex constructor:
Form:new {
string Name, string Title,
number PosX , number PosY,
number Width , number Height,
}
Arguments¶
These arguments are received by class constructor.
| Argument | Description |
|---|---|
| Name | The form’s name |
| PosX | Position related to X on Screen or Parent object |
| PosY | Position related to X on Screen or Parent object |
| Width | Width of the form |
| Height | Height of the form |
Events¶
The following events are emitted by this class:
| Event name | Description |
|---|---|
| Form.onShow | When the form is shown. |
| Form.onClose | When the form is closed. |
Class Methods¶
These methods are defined by this class.
| Class Method | Description |
|---|---|
| Object:getID | Returns widget’s identifier. |
| Object:setID | Sets the widget identifier. |
| Object:getName | Returns widget’s name. |
| Object:setName | Sets the widget name. |
| Widget:getParent | Returns control’s parent. |
| Widget:setParent | Sets the control parent. |
| Widget:getPosX | Returns control’s position related to X. |
| Widget:setPosX | Sets the control position related to X. |
| Widget:getPosY | Returns control’s position related to Y. |
| Widget:setPosY | Sets the control position related to Y. |
| Widget:getWidth | Returns control’s width. |
| Widget:setWidth | Sets the control width. |
| Widget:getHeight | Returns control’s height. |
| Widget:setHeight | Sets the control height. |
| Widget:getBind | Returns a reference to the C++ control. |
| Widget:getEnabled | Returns true if is enabled. |
| Widget:setEnabled | Set control enabled or disabled. |
| Widget:getVisible | Returns the control visibility. |
| Widget:setVisible | Returns the control visibility. |
| Window:show_ | Shows the Window. |
| Window:centre_ | Centers the window on the display. |
Example¶
In this example we create a new Form …
1 2 3 4 5 6 7 8 | myWnd = Form:new { Name = "MyForm",
-- PosX = 30, PosY = 70, Width , Height, >> Here we don't send the size, for using default sizes
Title = "YOUR NEW Form",
}
myWnd:show();
|