Button object
Event | Description |
---|---|
Button.onShow() | Event fired when the Button is shown |
Button.onHide() | Event fired when the Button is hidden |
Button.onClick() | Event fired when the user left clicks on the Button |
Button.onContext() | Event fired when the user right click on the Button |
Button.onHover() | Event fired when the user moves the mouse pointer over the Button |
Button.onLeave() | Event fired when the mouse cursor leaves the Button |
Button.onCreate() | Event fired when Button has just been created |
Button.onMouseDown() | Event fired when the user presses a mouse button over the Button |
Button.onMouseUp() | Event fired when the user releases a mouse button over the Button |
Button.onDrop() | Event fired when the Button received a drag and drop content |
Property | Description | Access | Type |
---|---|---|---|
Button.text | Get/set the Button text content | readwrite | string |
Button.textalign | Get/set the Button text alignment | readwrite | string |
Button.x | Get/set the Button's horizontal position | readwrite | number |
Button.y | Get/set the Button's vertical position | readwrite | number |
Button.width | Get/set the Button's width | readwrite | number |
Button.height | Get/set the Button's height | readwrite | number |
Button.cursor | Get/set the image of the mouse cursor as it hovers over the Button | readwrite | string |
Button.align | Align the Button relative to its parent | readwrite | boolean |
Button.enabled | Controls whether the Button responds to mouse and other events | readwrite | boolean |
Button.visible | Controls whether the Button appears on screen | readwrite | boolean |
Button.allowdrop | Controls whether the Button is a drag and drop target | readwrite | boolean |
Button.parent | Get the Button's parent widget | readonly | Window | Groupbox TabItem | Panel |
Button.font | Get/set the Button font | readwrite | string |
Button.fontstyle | Get/set the Button font style | readwrite | table |
Button.fontsize | Get/set the Button font size | readwrite | number |
Button.hastext | Get/set the Button's text visibility | readwrite | boolean |
Button.tooltip | Get/set the Button tooltip text | readwrite | string |
Method | Description | Return value |
---|---|---|
Button.constructor() | Button object constructor | Button |
Button:center() | Centers the Button on the parent widget | - |
Button:autosize() | Autosizes the Button | - |
Button:loadicon() | Load the Button icon | boolean |
Button:show() | Shows the Button | - |
Button:hide() | Hides the Button | - |
Button:tofront() | Brings the widget in front | - |
Button:toback() | Puts the widget to the back | - |