Lua:createButton

From Cheat Engine
Jump to navigation Jump to search

<> Lua API Reference

function createButton(owner) : Button

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

Main Pages

Core Lua documentation entry points

Lua
Script Engine

Basic Visual Controls

Text / Input Controls

Value / Progress Controls

Graphics / Resources

Strings / Streams

Timers / Hotkeys

Scanning / Found Lists

Other Creation Helpers