GuiDeleteTab: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
No edit summary
mNo edit summary
Line 1: Line 1:
{{Needs_checking|This function doesnt actually work. --[[User:Talidan2|Talidan2]] 13:30, 15 August 2007 (CDT)}}
{{Needs_Checking|This function doesnt actually work. --[[User:Talidan2|Talidan2]] 13:30, 15 August 2007 (CDT)}}
__NOTOC__  
__NOTOC__  
{{Client function}}
{{Client function}}

Revision as of 18:30, 15 August 2007

Dialog-information.png This article needs checking.

Reason(s): This function doesnt actually work. --Talidan2 13:30, 15 August 2007 (CDT)

This function allows for deletion of a tab from a tab panel

Syntax

bool guiDeleteTab ( element tabToDelete )

Required Arguments

  • tabToDelete: This is an element representing the tab that you want to delete.

Returns

Returns true the tab was successfully deleted, false otherwise.

Example

This example removes a tab panel if a user LeftCtrl+Clicks a tab panel.

function deleteTabOnClick ()
	if ( getKeyState ( "lctrl" ) == true ) then --if he's holding down left control
		guiDeleteTab ( source )--delete the tab.  The function wont work anyway for other types of elements so no check is required.
	end
end
addEventHandler ( "onClientClick", getRootElement(), deleteTabOnClick  )--add an event handler for this

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