NumberEditLib:onFocus
since 1.5.14
Function called when the focus is changed.
Parameters
| Name |
Type |
Required |
Description |
handler |
function |
yes |
function(state) |
Returns
Nothing.
Examples
From the official Ethos documentationlocal line = form.addLine("Number edit line")
local value = 10
local field = form.addNumberField(line, nil, 0, 10, function() return value end, function(newValue) value = newValue end)
field:onFocus(function(state) print("onFocus .. " .. state))