Any change in the Checkbox.font, Checkbox.fontstyle and Checkbox.fontsize properties results in an automatic resizing of the Checkbox so that the content is displayed correctly
Checkbox.fontsize
Get or set the Checkbox font size, a number that represent the font size in pixels.
Example
--! luart-extensions
import ui
-- create a simple checkbox
local win = ui.Window("Checkbox.fontsize sample", 640, 200)
local checkbox = ui.Checkbox(win, "", 200, 70)
checkbox.fontsize = 16
function checkbox:onClick()
self.fontsize = math.random(8, 24)
self.text = self.font.." font, "..self.fontsize.."px"
end
checkbox:onClick()
win:show()
-- update the user interface until the user closes the Window
repeat
ui.update()
until not win.visible