Tab.y read/write property


Get or set the Tab 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("Tab.y sample", 600, 300) local button = ui.Button(win, "Change Tab position", 240) local tab = ui.Tab(win, {'Item 1', 'Item 2'}, 10, 140) function button:onClick() tab.x = math.random(10, win.width-tab.width) tab.y = math.random(60, win.height-tab.height) end -- shows the window win:show() -- update user interface and increase Tab horizontal position repeat ui.update() until not win.visible