Tree.fontsize read/write property
Get or set the Tree font size, a number that represent the font size in pixels.
Example
local ui = require "ui"
-- create a simple Window
local win = ui.Window("Tree.fontsize sample", 320, 240)
ui.Label(win, "Font size :", 100, 10)
local tree = ui.Tree(win, {"Item 1", "Item 2", "Item 3"}, 106, 40)
-- create a font size tree
local cb = ui.Combobox(win, { tree.fontsize, tree.fontsize+2, tree.fontsize+4, tree.fontsize+6, tree.fontsize+8 }, 150, 6, 80)
cb.selected = cb.items[1]
-- change tree.fontstyle upon selection
function cb:onSelect(item)
tree.fontsize = item.text
win:status("Tree font size = "..tree.fontsize)
end
win:show()
-- update the user interface until the user closes the Window
repeat
ui.update()
until not win.visible