guiDeleteTab | Multi Theft Auto: Wiki Skip to content

guiDeleteTab

Client-side
Server-side
Shared

This page is incomplete! Help wanted!

Please finish this page using the corresponding Old Wiki article.
Go to Contribution guidelines for more information.


This function deletes a tab from a tab panel.

Syntax

guiDeleteTab ( )

Code Examples

client

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

function deleteTabOnClick ()
if ( getKeyState ( "lctrl" ) == true ) and ( getElementType( source ) == "gui-tab" ) then -- if the user is holding down left control
guiDeleteTab ( source, getElementParent(source) ) -- delete the tab. No need to check if it was actually a tab that was clicked, as this function doesn't work on other controls anyway
end
end
addEventHandler ( "onClientGUIClick", getRootElement(), deleteTabOnClick ) -- add an event handler for clicks

See Also

GUI Functions