guiSetSelectedTab
Client-side
Server-side
Shared
Manual Review Required
Please finish this page using the corresponding Old Wiki article. Go to Contribution guidelines for more information.
This function is used to change the currently selected tab in a tab panel.
Syntax
bool guiSetSelectedTab ( element tabPanel, element theTab )Required Arguments
- tabPanel: The tab panel which current tab you want to change.
- theTab: The tab which will be the new active tab.
Returns
- bool: value
Returns true if the selected tab was changed to a new one successfully, false otherwise.
Code Examples
shared
This example changes the selected tab to the next available tab.
local tabPanel = guiCreateTabPanel ( 0, 0.1, 1, 1, true) --create a tab panel which fills the whole windowlocal tab1 = guiCreateTab("Welcome",tabPanel) --create a tab for the tab panel abovelocal tab2 = guiCreateTab("Info",tabPanel)--create another tab for the tab panel at the top
function check() if(guiGetSelectedTab(tabPanel)==tab1)then --Check what tab is currently shown guiSetSelectedTab(tabPanel,tab2) --if the "Welcome" tab is selected, change it to tab2("Info" tab) else guiSetSelectedTab(tabPanel,tab1) --if the "Info" tab is selected, change it to tab1("Welcome" tab) endendSee Also
GUI Functions
- getChatboxCharacterLimit
- getChatboxLayout
- guiBlur
- guiBringToFront
- guiCheckBoxGetSelected
- guiCheckBoxSetSelected
- guiComboBoxAddItem
- guiComboBoxClear
- guiComboBoxGetItemCount
- guiComboBoxGetItemText
- guiComboBoxGetSelected
- guiComboBoxIsOpen
- guiComboBoxRemoveItem
- guiComboBoxSetItemText
- guiComboBoxSetOpen
- guiComboBoxSetSelected
- guiCreateBrowser
- guiCreateButton
- guiCreateCheckBox
- guiCreateComboBox
- guiCreateEdit
- guiCreateFont
- guiCreateGridList
- guiCreateLabel
- guiCreateMemo
- guiCreateProgressBar
- guiCreateRadioButton
- guiCreateScrollBar
- guiCreateScrollPane
- guiCreateStaticImage
- guiCreateTab
- guiCreateTabPanel
- guiCreateWindow
- guiDeleteTab
- guiEditGetCaretIndex
- guiEditGetMaxLength
- guiEditIsMasked
- guiEditIsReadOnly
- guiEditSetCaretIndex
- guiEditSetMasked
- guiEditSetMaxLength
- guiEditSetReadOnly
- guiFocus
- guiGetAlpha
- guiGetBrowser
- guiGetCursorType
- guiGetEnabled
- guiGetFont
- guiGetInputEnabled
- guiGetInputMode
- guiGetPosition
- guiGetProperties
- guiGetProperty
- guiGetScreenSize
- guiGetSelectedTab
- guiGetSize
- guiGetText
- guiGetVisible
- guiGridListAddColumn
- guiGridListAddRow
- guiGridListAutoSizeColumn
- guiGridListClear
- guiGridListGetColumnCount
- guiGridListGetColumnTitle
- guiGridListGetColumnWidth
- guiGridListGetHorizontalScrollPosition
- guiGridListGetItemColor
- guiGridListGetItemData
- guiGridListGetItemText
- guiGridListGetRowCount
- guiGridListGetSelectedCount
- guiGridListGetSelectedItem
- guiGridListGetSelectedItems
- guiGridListGetSelectionMode
- guiGridListGetVerticalScrollPosition
- guiGridListInsertRowAfter
- guiGridListIsSortingEnabled
- guiGridListRemoveColumn
- guiGridListRemoveRow
- guiGridListSetColumnTitle
- guiGridListSetColumnWidth
- guiGridListSetHorizontalScrollPosition
- guiGridListSetItemColor
- guiGridListSetItemData
- guiGridListSetItemText
- guiGridListSetScrollBars
- guiGridListSetSelectedItem
- guiGridListSetSelectionMode
- guiGridListSetSortingEnabled
- guiGridListSetVerticalScrollPosition
- guiLabelGetColor
- guiLabelGetFontHeight
- guiLabelGetTextExtent
- guiLabelSetColor
- guiLabelSetHorizontalAlign
- guiLabelSetVerticalAlign
- guiMemoGetCaretIndex
- guiMemoGetVerticalScrollPosition
- guiMemoIsReadOnly
- guiMemoSetCaretIndex
- guiMemoSetReadOnly
- guiMemoSetVerticalScrollPosition
- guiMoveToBack
- guiProgressBarGetProgress
- guiProgressBarSetProgress
- guiRadioButtonGetSelected
- guiRadioButtonSetSelected
- guiScrollBarGetScrollPosition
- guiScrollBarSetScrollPosition
- guiScrollPaneGetHorizontalScrollPosition
- guiScrollPaneGetVerticalScrollPosition
- guiScrollPaneSetHorizontalScrollPosition
- guiScrollPaneSetScrollBars
- guiScrollPaneSetVerticalScrollPosition
- guiSetAlpha
- guiSetEnabled
- guiSetFont
- guiSetInputEnabled
- guiSetInputMode
- guiSetPosition
- guiSetProperty
- guiSetSelectedTab
- guiSetSize
- guiSetText
- guiSetVisible
- guiStaticImageGetNativeSize
- guiStaticImageLoadImage
- guiWindowIsMovable
- guiWindowIsSizable
- guiWindowSetMovable
- guiWindowSetSizable
- isChatBoxInputActive
- isConsoleActive
- isDebugViewActive
- isMainMenuActive
- isMTAWindowActive
- isTransferBoxActive
- setChatboxCharacterLimit
- setDebugViewActive