GuiDeleteTab
From Multi Theft Auto: Wiki
This function deletes a tab from a tab panel.
Syntax
bool guiDeleteTab ( element tabToDelete, element tabPanel )
Required Arguments
- tabToDelete: This is an element representing the tab that you want to delete.
- tabPanel: This is the tab panel parent that the tab is attached to.
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 ) 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
- guiGetInputMode
- guiGetPosition
- guiGetProperties
- guiGetProperty
- guiGetScreenSize
- guiGetSize
- guiGetText
- guiGetVisible
- guiMoveToBack
- guiSetAlpha
- guiSetEnabled
- guiSetFont
- guiSetInputEnabled
- guiSetInputMode
- guiSetPosition
- guiSetProperty
- guiSetSize
- guiSetText
- guiSetVisible
- isChatBoxInputActive
- isConsoleActive
- isDebugViewActive
- isMainMenuActive
- isMTAWindowActive
- isTransferBoxActive
Buttons
Checkboxes
Comboboxes
- guiCreateComboBox
- guiComboBoxAddItem
- guiComboBoxClear
- guiComboBoxGetItemText
- guiComboBoxSetItemText
- guiComboBoxRemoveItem
- guiComboBoxGetSelected
- guiComboBoxSetSelected
Edit fields
Gridlists
- guiCreateGridList
- guiGridListAddColumn
- guiGridListAddRow
- guiGridListAutoSizeColumn
- guiGridListClear
- guiGridListGetItemData
- guiGridListGetItemText
- guiGridListGetRowCount
- guiGridListGetSelectedItem
- guiGridListInsertRowAfter
- guiGridListRemoveColumn
- guiGridListRemoveRow
- guiGridListSetItemData
- guiGridListSetItemText
- guiGridListSetScrollBars
- guiGridListSetSelectedItem
- guiGridListSetSelectionMode
- guiGridListSetSortingEnabled
Memos
Progress bars
Radio buttons
Scrollbars
Scroll panes
- guiCreateScrollPane
- guiScrollPaneGetHorizontalScrollPosition
- guiScrollPaneGetVerticalScrollPosition
- guiScrollPaneSetHorizontalScrollPosition
- guiScrollPaneSetScrollBars
- guiScrollPaneSetVerticalScrollPosition
Static images
Tab panels
Tabs
- guiCreateTab
- guiDeleteTab
Text labels
- guiCreateLabel
- guiLabelGetFontHeight
- guiLabelGetTextExtent
- guiLabelSetColor
- guiLabelSetHorizontalAlign
- guiLabelSetVerticalAlign
Windows