List.height read/write property


Get or set the height of the List. The height starts from 0 (top side of the List) and increase to the bottom direction.

Example

local ui = require "ui" -- create a simple Window local win = ui.Window("List.height sample", 320, 180) local list = ui.List(win, {"LuaRT", "is", "fun !"}, 110, 60) local inc_btn = ui.Button(win, "Increase List.height !", 15, 10) local dec_btn = ui.Button(win, "Decrease List.height", inc_btn.x+150, inc_btn.y) function inc_btn:onClick() local delta if self == inc_btn then delta = 10 else delta = -10 end list.height = list.height + delta end dec_btn.onClick = inc_btn.onClick -- shows the Window win:show() -- update user interface repeat ui.update() until not win.visible