ui.createButton
Description
Creates a custom button as a child of the specified control.

Parameters
parentHandle integer
component name integer
x integer
y integer
w integer
h integer
caption string

Return value
none

Example
-- get handle to current Stock Tracker window
local parentHandle = ui.getHandle(HANDLE_CURRENT_WINDOW)

-- create button within current Stock Tracker window
ui.createButton(parentHandle, "custom__button_1", 16, 16, 160, 32, "Press Me")

Comments
Use ui.getHandle() to get a valid parent handle first.

Component name must not contain spaces or certain characters and be unique within the direct parent's scope.
Good: "my_button_1" or "MyButton1"
Bad: "My button 1"


See also
ui.getHandle

Back