GuiSetVisible

From Multi Theft Auto: Wiki
Revision as of 15:44, 17 August 2007 by Arc (talk | contribs)
Jump to navigation Jump to search

This function changes the visibility state of a GUI element.

Syntax

bool guiSetVisible ( element guiElement, bool state )

Required Arguments

  • guiElement: the GUI element whose visibility is to be changed
  • state: the new visibility state

Returns

Returns true if the element's visibility could be changed, false otherwise.

Example

This example toggles gui element visibility.

function guiToggleVisible ( guiElement )
	-- we check if the gui element is visible
	if guiGetVisible ( guiElement ) then
		-- if it is, we hide it
		guiSetVisible ( guiElement, false )
	else
		-- if not, we make it visible
		guiSetVisible ( guiElement, true )
	end
end

See Also

General functions

Browsers

Buttons

Checkboxes

Comboboxes

Edit Boxes

Gridlists

Memos

Progressbars

Radio Buttons

Scrollbars

Scrollpanes

Static Images

Tab Panels

Tabs

Text Labels

Windows