ObjectTree

From VisionaireWiki
Jump to: navigation, search

objectTree

Create an object-tree.

Lua Syntax:

objectTree(windowName [, model], {flags=1, 
    owner = "object path"|"object id"|object, 
    edit = true|false, 
    expandAll = true|false, 
    position = {x=int,y=int}, 
    size = {x=int,y=int}, 
    border = "[lrtb] width", 
    align = "left"|"right"|"center"|"top"|"bottom", 
    expand = "shaped", 
    proportion = int})

Arguments

windowName

"string" - Name of the new tree-control.

model

"string" - Sets the model which is used to populate the tree. The model can only be set when creating the tree and not when editing an existing tree. Currently only "OutfitAnimations" (requires a character owner) and "DialogParts" (requires a dialog owner).

Flags

own/owner

Sets an owner which is used for the root object of the tree.

e/edit

If true then edit an existing object-tree.

exa/expandAll

If true then all nodes of the object-tree will be expanded (default). If false nothing will be expanded when the owner is set.

pos/position

Specifies the position of the window.

sz/size

Specifies the size of the window.

b/border

This flag specifies to which side(s) of the control a border will be applied to.
"[lrtb] width" - First group is a string combining characters standing for 'left', 'right', 'top' and 'bottom' side.After a space the width of the border in pixel is specified.

al/align

Specifies the alignment of the item within the space allotted to it by the layout.
"left"|"right"|"center"|"top"|"bottom" - Alignment of control. Top- and bottom-align only makes sense in a row-layout, left- and right-align in a column layout.

exp/expand

Specifies whether the item will be expanded to fill the space assigned to the item.
"shaped" - With this argument the item will be expanded as much as possible while also maintaining its aspect ratio

p/proportion

Used in row- and column-layout to indicate if a child of a layout can change its size in the main orientation of the layout - where 0 stands for not changeable and a value of more than zero is interpreted relative to the value of other children of the same layout.

Return Values

String
Name of the new object-tree control.