SetVisible

From LoTROInterface Wiki

Jump to: navigation, search


Sets the visible flag of a control.

Syntax

Lua
function Control:SetVisible(value);

Parameters

value
Type: boolean
The new visibility state. True to show, false to hide.

Remarks

A control only being visible means that it should draw itself. However, if its parents are not visible the control will still not be displayed.

Examples

This example demonstrates toggling the visibility of a control by a button press.


Toggling Visibility
label:SetText("Hello!");

button = Turbine.UI.Button();
button.Click[_] = function( sender, args )
-- Toggle the visibility of the label on each click.
label:SetVisibility( lable:GetVisibility() );
end
Personal tools