Beta Documentation - Subject to change.

Sets the text of the label.

Syntax

Lua
function Label:SetText(value);

Parameters

value
Type: string
The text of the label.

Remarks

Sets the text of the label. This will clear any selection that had been made.

Examples

Quick example that changes the text of a label.
Sets the Text of a LabelCopy Code
        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:SetSeletable( true );
        label:SetPosition( 40, 60 );
        label:SetSize( 120, 80 );
        label:SetBackColor( Turbine.UI.Color( 0.2, 0.2, 0.2 ) );
        label:SetText( "Hello world!" );
        label:SetTextAlignment( Turbine.UI.ContentAlignment.MiddleCenter );

See Also