Label
From LoTROInterface Wiki
API Reference > Turbine.UI.Label
A simple label for displaying text.
Contents |
Methods
Name | Description |
---|---|
AppendText | Appends text to the end of the label. |
DeselectAll | Deselects all the text in the control. |
GetAllowDrop | Gets if the control supports drop operations from drag and drop. (Inherited from Control) |
GetBackColor | Gets the solid background color of the control. (Inherited from Control) |
GetBackColorBlendMode | Gets the blend mode applied to the background color. (Inherited from Control) |
GetBlendMode | Gets the blend mode applied to the background image. (Inherited from Control) |
GetControls | Gets the list of child controls. (Inherited from Control) |
GetFont | Gets the current font. |
GetFontStyle | Gets the font style. |
GetForeColor | Gets the foreground color. |
GetHeight | Gets the height of the control. (Inherited from Control) |
GetHorizontalScrollBar | Gets the horizontal scroll bar. (Inherited from ScrollableControl) |
GetLeft | Gets the left coordinate of the control. (Inherited from Control) |
GetMousePosition | Gets the mouse position relative to this control. (Inherited from Control) |
GetMouseVisible | Gets a flag indicating if the mouse will see this control. (Inherited from Control) |
GetOpacity | Gets the opacity of the window. (Inherited from Control) |
GetOutlineColor | Gets the text outline color. |
GetParent | Gets the parent of the control. (Inherited from Control) |
GetPosition | Gets the position of the control. (Inherited from Control) |
GetSelectedText | Gets the selected text of the label. |
GetSelectionLength | Gets the length of the selected text. |
GetSelectionStart | Gets the position of the selection start. |
GetSize | Gets the size of the control. (Inherited from Control) |
GetText | Gets the text of the label. |
GetTextAlignment | Gets the alignment of the text within the label. |
GetTextLength | Gets the length of the text of the label. |
GetTop | Gets the top coordinate of the window. (Inherited from Control) |
GetVerticalScrollBar | Gets the vertical scroll bar. (Inherited from ScrollableControl) |
GetWantsKeyEvents | Gets a flag indicating if the control wants to receive key events. (Inherited from Control) |
GetWantsUpdates | Gets the flag indicating if the control wants to receive Update notifications. (Inherited from Control) |
GetWidth | Gets the width of the control. (Inherited from Control) |
GetZOrder | Gets the Z ordering index of the control. (Inherited from Control) |
InsertText | Inserts text into the label at the current cursor position. |
IsAltKeyDown | Test if the alt key is pressed. (Inherited from Control) |
IsControlKeyDown | Test if the control key is pressed. (Inherited from Control) |
IsEnabled | Gets a flag indicating if the control is enabled. (Inherited from Control) |
IsMarkupEnabled | . |
IsMultiline | Gets if the label is set to display multiple lines. |
IsSelectable | Gets a flag indicating if the text in the label is selectable. |
IsShiftKeyDown | Test if the shift key is pressed. (Inherited from Control) |
IsVisible | Gets a flag indicating if the control is visible. (Inherited from Control) |
PointToClient | Converts a coordinate from control space to screen space. (Inherited from Control) |
PointToScreen | Converts a coordinate from control space to screen space. (Inherited from Control) |
SelectAll | Selects all the text in the control. |
SetAllowDrop | Sets if the control supports drop operations from drag and drop. (Inherited from Control) |
SetBackColor | Sets the background color of the control. (Inherited from Control) |
SetBackColorBlendMode | Sets the blend mode applied to the background color. (Inherited from Control) |
SetBackground | Sets the background image of the control. (Inherited from Control) |
SetBlendMode | Sets the blend mode applied to the background image. (Inherited from Control) |
SetEnabled | Sets a flag indicating if the control is enabled. (Inherited from Control) |
SetFont | Sets the current font. |
SetFontStyle | Sets the font style. |
SetForeColor | Sets the foreground color. |
SetHeight | Sets the height of the control. (Inherited from Control) |
SetHorizontalScrollBar | Sets the horizontal scroll bar. (Inherited from ScrollableControl) |
SetLeft | Sets the left coordinate of the window. (Inherited from Control) |
SetMarkupEnabled | . |
SetMouseVisible | Gets a flag indicating if the mouse will see this control. (Inherited from Control) |
SetMultiline | Sets if the label should display on multiple lines. |
SetOpacity | Sets the opacity of the window. (Inherited from Control) |
SetOutlineColor | Sets the text outline color. |
SetParent | Sets the parent of the control. (Inherited from Control) |
SetPosition | Sets the position of the control. (Inherited from Control) |
SetSelectable | Sets a flag indicating if the text in the label can be selected. |
SetSelectedText | Replaces the selected text. |
SetSelection | Sets the selected text. |
SetSelectionLength | Sets the length of the selected text. |
SetSelectionStart | Sets the position of the selection start. |
SetSize | Sets the size of the control. (Inherited from Control) |
SetText | Sets the text of the label. |
SetTextAlignment | Sets the alignment of the text within the label. |
SetTop | Sets the top coordinate of the window. (Inherited from Control) |
SetVerticalScrollBar | Sets the vertical scroll bar. (Inherited from ScrollableControl) |
SetVisible | Sets the visible flag of a control. (Inherited from Control) |
SetWantsKeyEvents | Sets a flag indicating if the control wants to receive key events. (Inherited from Control) |
SetWantsUpdates | Sets the flag indicating if the cotnrol wants to receive update notifications. (Inherited from Control) |
SetWidth | Sets the width of the control. (Inherited from Control) |
SetZOrder | Sets the Z order of the control. (Inherited from Control) |
Events
Name | Description |
---|---|
DragDrop | Event fired when a drag drop operation is completed. (Inherited from Control) |
DragEnter | Event fired when a drag drop operation enters the control. (Inherited from Control) |
DragLeave | Event fired when a drag drop operation leaves the control. (Inherited from Control) |
EnabledChanged | Event fired when the enabled state of the control changes. (Inherited from Control) |
FocusGained | Event fired when the control gains focus. (Inherited from Control) |
FocusLost | Event fired when the control loses focus. (Inherited from Control) |
KeyDown | Event fired when a key is pressed down. (Inherited from Control) |
KeyUp | Event fired when a key is released. (Inherited from Control) |
MouseClick | Event fired when a mouse button is clicked. (Inherited from Control) |
MouseDoubleClick | Event fired when a mouse button is double clicked. (Inherited from Control) |
MouseDown | Event fired when a mouse button is pressed. (Inherited from Control) |
MouseEnter | Event fired when the mouse enters the control. (Inherited from Control) |
MouseHover | Event fired when the mouse is hovering over the control. (Inherited from Control) |
MouseLeave | Event fired when the mouse leaves the cotnrol. (Inherited from Control) |
MouseMove | Event fired when the mouse moves. (Inherited from Control) |
MouseUp | Event fired when a mouse button is released. (Inherited from Control) |
MouseWheel | Event fired when a mouse wheel moves. (Inherited from Control) |
PositionChanged | Event fired when the position of the control changes. (Inherited from Control) |
SizeChanged | Event fired when the size of the control changes. (Inherited from Control) |
Update | Event fired every frame when WantsUpdates is enabled. (Inherited from Control) |
VisibleChanged | Event fired when the visible state of the control changes. (Inherited from Control) |
Remarks
This class extends a control for the purpose of displaying some text. It contains simple methods for describing how to layout the text and display it.
Examples
This example displays some text in a label contained inside a window.
Displaying Text | |
---|---|
import "Turbine.UI.Lotro"; window = Turbine.UI.Lotro.Window(); window:SetPosition( 200, 200 ); window:SetSize( 200, 200 ); window:SetText( "Test" ); window:SetVisible( true ); label = Turbine.UI.Label(); label:SetParent( window ); label:SetPosition( 40, 60 ); label:SetSize( 120, 80 ); label:SetBackColor( Turbine.UI.Color( 0.2, 0.2, 1 ) ); label:SetText( "Hello world!" ); label:SetTextAlignment( Turbine.UI.ContentAlignment.MiddleCenter ); |