List.fontsize read/write property
Get or set the List font size, a number that represent the font size in pixels.
Example
local ui = require "ui"
-- create a simple Window
local win = ui.Window("List.fontsize sample", 320, 200)
ui.Label(win, "font size :", 110, 24)
local list = ui.List(win, {"Item 1", "Item 2", "Item 3"}, 116, 58)
list.selected = list.items[1]
-- create a font style list
local cb = ui.Combobox(win, { list.fontsize, list.fontsize+2, list.fontsize+4, list.fontsize+6, list.fontsize+8 }, 160, 20, 40)
cb.selected = cb.items[1]
-- change list.fontstyle upon selection
function cb:onSelect(item)
list.fontsize = item.text
win:status("List font size = "..list.fontsize)
end
win:show()
-- update the user interface until the user closes the Window
repeat
ui.update()
until not win.visible