Tree:center()method


Centers the Tree on the parent widget.

Return value

This function returns no value.

Example

--! luart-extensions import ui -- create a simple Window local win = ui.Window("Groupbox:center() sample", 320, 270) local tree = ui.Tree(win, {"Item1", "Item2", "Item 3"}) ui.Button(win, "Center Tree", 112, 240).onClick = function (self) tree:center() end win:show() -- update the user interface until the user closes the Window repeat ui.update() until not win.visible