Button.text read/write property


Get or set the Button caption as a string.

Example

local ui = require "ui" -- create a simple Window local win = ui.Window("Button.text sample", 320, 200) -- add a Button... local button = ui.Button(win, "LuaRT", 130, 80) function button:onClick() ui.info("button.text property = "..self.text) end win:show() -- update the user interface until the user closes the Window repeat ui.update() until not win.visible