Difference between revisions of "Lua:createButton"
Jump to navigation
Jump to search
(Initial page creation.) |
m (→Examples: Syntax Highlight.) |
||
| (One intermediate revision by the same user not shown) | |||
| Line 21: | Line 21: | ||
===Examples=== | ===Examples=== | ||
| − | < | + | <syntaxhighlight lang="lua" line> |
local form = createForm() | local form = createForm() | ||
local button = createButton(form) | local button = createButton(form) | ||
button.Caption = "Run" | button.Caption = "Run" | ||
button.OnClick = function() showMessage("Clicked") end | button.OnClick = function() showMessage("Clicked") end | ||
| − | </ | + | </syntaxhighlight> |
{{LuaSeeAlso}} | {{LuaSeeAlso}} | ||
| + | |||
| + | {{Creation}} | ||
Latest revision as of 00:56, 27 June 2026
Creates a Button control.
The new Button belongs to the supplied owner. The owner must inherit from WinControl.
Function Parameters[edit]
| Parameter | Type | Description |
|---|---|---|
| owner | WinControl | The parent/owner of the new Button. |
Returns[edit]
Button — The newly created Button object.
Examples[edit]
1 local form = createForm()
2 local button = createButton(form)
3 button.Caption = "Run"
4 button.OnClick = function() showMessage("Clicked") end