Any change in the Groupbox.font, Groupbox.fontstyle and Groupbox.fontsize properties results in an automatic resizing of the Groupbox so that the content is displayed correctly
Groupbox.fontsize
Get or set the Groupbox font size, a number that represent the font size in pixels.
Example
--! luart-extensions
import ui
-- create a simple groupbox
local win = ui.Window("Groupbox.fontsize sample", 250, 260)
local groupbox = ui.Groupbox(win, "", 10, 50, 230, 200)
local label = ui.Label(win, "Enter font size :", 50, 10)
local entry = ui.Entry(win, "8", label.x + label.width+6, 8)
ui.Button(groupbox, "Child Button", 70, 80)
function entry:onSelect()
groupbox.fontsize = tonumber(entry.text)
groupbox.text = groupbox.font.." font, "..groupbox.fontsize.."px"
end
entry:onSelect()
win:show()
-- update the user interface until the user closes the Window
repeat
ui.update()
until not win.visible