EventLabel

From VisionaireWiki
Revision as of 12: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

eventLabel

Creates a label which adapts it text when receiving specific events.

Lua Syntax:

eventLabel(labelName [, text, eventName], {flags=1, 
    edit = true|false, 
    select = "string", 
    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

labelName

"string" - Name of the event-label.

text

"string" - Text which is displayed until an event occurs.

eventName

"string" - Name of the event which is handled by the control. Currently the events 'ZoomChanged' and 'CursorPositionChanged' are supported.Use 'None' if this is a static label.

Flags

e/edit

If true then edit an existing event-label.

s/select

The event label is connected to this control.

alt/alignText

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

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.