VisObjLabel

From VisionaireWiki
Revision as of 11:57, 16 August 2009 by Alex (talk | contribs) (Bot (Edward's framework))
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

visObjLabel

Creates a static text label which is linked to a visionaire object to display its name.

If control-name is omitted the default-parent is used or a name is created automatically. After execution the new window is the default-parent and the default-layout is empty. If window already exists its top-level layout becomes the new default-layout.

Lua Syntax:

visObjLabel(controlName [, displayObject, formatString], {flags=1, 
    edit = true|false, 
    alignText = "left"|"right"|"center", 
    fontFamily = "default"|"decorative"|"roman"|"script"|"swiss"|"modern"|"teletype", 
    fontWeight = "normal"|"light"|"bold", 
    fontSize = int, 
    color = color, 
    bgcolor = color, 
    position = {x=int,y=int}, 
    size = {x=int,y=int}, 
    border = "[lrtb] width", 
    align = "left"|"right"|"center"|"top"|"bottom", 
    expand = "shaped", 
    proportion = int})

Arguments

controlName

"string" - Name of the vis object label control.

displayObject

"object path"|"object id"|object - The name of this object is displayed by this control.

formatString

"string" - Format string for the label. Must contain one '%s' where the object name will be inserted.

Flags

e/edit

If true then edit an existing text control.

alt/alignText

Specifies the alignment of the text.
"left"|"right"|"center" - Horizontal alignment of the text.

ffy/fontFamily

Specifies the font family used for the text.
"default"|"decorative"|"roman"|"script"|"swiss"|"modern"|"teletype" - Font family of the text.

fw/fontWeight

Specifies the font weight used for the text.
"normal"|"light"|"bold" - Font weight of the text.

fs/fontSize

Specifies the font size in points used for the text.

col/color

Specifies the text color.
color - A string which contains red, green and blue as hexadecimal numbers without any separators.

bgc/bgcolor

Specifies the background color of the text control.
color - A string which contains red, green and blue as hexadecimal numbers without any separators.

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

None.