Beta Documentation - Subject to change.

Sets a flag indicating if the text in the label can be selected.

Syntax

Lua
function Label:SetSelectable(value);

Parameters

value
Type: boolean
True to enable selection of text in the label.

Remarks

When set, the text in the label control can be selected using the mouse by clicking and dragging a region of text.

Examples

This example demonstrates displaying text in a label that can be selected by the user.
Create Selectable TextCopy 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, 1 ) );
        label:SetText( "Hello!nnThis is selectable!" );
        label:SetTextAlignment( Turbine.UI.ContentAlignment.MiddleCenter );

See Also