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