List.y read/write property
Get or set the List vertical position. The vertical position start from 0 (top side of the parent widget) and increase to the bottom side of the parent widget.
Example
local ui = require "ui"
-- create a simple window
local win = ui.Window("List.y sample", 600, 300)
local button = ui.Button(win, "Change List position", 240)
local list = ui.List(win, {'Item 1', 'Item 2'}, 10, 140)
function button:onClick()
list.x = math.random(10, win.width-list.width)
list.y = math.random(40, win.height-list.height)
end
-- shows the window
win:show()
-- update user interface and increase List horizontal position
repeat
ui.update()
until not win.visible