class_tabcontainer.rst 49 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124
  1. :github_url: hide
  2. .. DO NOT EDIT THIS FILE!!!
  3. .. Generated automatically from Godot engine sources.
  4. .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py.
  5. .. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/TabContainer.xml.
  6. .. _class_TabContainer:
  7. TabContainer
  8. ============
  9. **Inherits:** :ref:`Container<class_Container>` **<** :ref:`Control<class_Control>` **<** :ref:`CanvasItem<class_CanvasItem>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
  10. A container that creates a tab for each child control, displaying only the active tab's control.
  11. .. rst-class:: classref-introduction-group
  12. Description
  13. -----------
  14. Arranges child controls into a tabbed view, creating a tab for each one. The active tab's corresponding control is made visible, while all other child controls are hidden. Ignores non-control children.
  15. \ **Note:** The drawing of the clickable tabs is handled by this node; :ref:`TabBar<class_TabBar>` is not needed.
  16. .. rst-class:: classref-introduction-group
  17. Tutorials
  18. ---------
  19. - :doc:`Using Containers <../tutorials/ui/gui_containers>`
  20. .. rst-class:: classref-reftable-group
  21. Properties
  22. ----------
  23. .. table::
  24. :widths: auto
  25. +---------------------------------------------------+-----------------------------------------------------------------------------------------------+-----------+
  26. | :ref:`bool<class_bool>` | :ref:`all_tabs_in_front<class_TabContainer_property_all_tabs_in_front>` | ``false`` |
  27. +---------------------------------------------------+-----------------------------------------------------------------------------------------------+-----------+
  28. | :ref:`bool<class_bool>` | :ref:`clip_tabs<class_TabContainer_property_clip_tabs>` | ``true`` |
  29. +---------------------------------------------------+-----------------------------------------------------------------------------------------------+-----------+
  30. | :ref:`int<class_int>` | :ref:`current_tab<class_TabContainer_property_current_tab>` | ``-1`` |
  31. +---------------------------------------------------+-----------------------------------------------------------------------------------------------+-----------+
  32. | :ref:`bool<class_bool>` | :ref:`deselect_enabled<class_TabContainer_property_deselect_enabled>` | ``false`` |
  33. +---------------------------------------------------+-----------------------------------------------------------------------------------------------+-----------+
  34. | :ref:`bool<class_bool>` | :ref:`drag_to_rearrange_enabled<class_TabContainer_property_drag_to_rearrange_enabled>` | ``false`` |
  35. +---------------------------------------------------+-----------------------------------------------------------------------------------------------+-----------+
  36. | :ref:`AlignmentMode<enum_TabBar_AlignmentMode>` | :ref:`tab_alignment<class_TabContainer_property_tab_alignment>` | ``0`` |
  37. +---------------------------------------------------+-----------------------------------------------------------------------------------------------+-----------+
  38. | :ref:`FocusMode<enum_Control_FocusMode>` | :ref:`tab_focus_mode<class_TabContainer_property_tab_focus_mode>` | ``2`` |
  39. +---------------------------------------------------+-----------------------------------------------------------------------------------------------+-----------+
  40. | :ref:`TabPosition<enum_TabContainer_TabPosition>` | :ref:`tabs_position<class_TabContainer_property_tabs_position>` | ``0`` |
  41. +---------------------------------------------------+-----------------------------------------------------------------------------------------------+-----------+
  42. | :ref:`int<class_int>` | :ref:`tabs_rearrange_group<class_TabContainer_property_tabs_rearrange_group>` | ``-1`` |
  43. +---------------------------------------------------+-----------------------------------------------------------------------------------------------+-----------+
  44. | :ref:`bool<class_bool>` | :ref:`tabs_visible<class_TabContainer_property_tabs_visible>` | ``true`` |
  45. +---------------------------------------------------+-----------------------------------------------------------------------------------------------+-----------+
  46. | :ref:`bool<class_bool>` | :ref:`use_hidden_tabs_for_min_size<class_TabContainer_property_use_hidden_tabs_for_min_size>` | ``false`` |
  47. +---------------------------------------------------+-----------------------------------------------------------------------------------------------+-----------+
  48. .. rst-class:: classref-reftable-group
  49. Methods
  50. -------
  51. .. table::
  52. :widths: auto
  53. +-----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
  54. | :ref:`Control<class_Control>` | :ref:`get_current_tab_control<class_TabContainer_method_get_current_tab_control>`\ (\ ) |const| |
  55. +-----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
  56. | :ref:`Popup<class_Popup>` | :ref:`get_popup<class_TabContainer_method_get_popup>`\ (\ ) |const| |
  57. +-----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
  58. | :ref:`int<class_int>` | :ref:`get_previous_tab<class_TabContainer_method_get_previous_tab>`\ (\ ) |const| |
  59. +-----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
  60. | :ref:`TabBar<class_TabBar>` | :ref:`get_tab_bar<class_TabContainer_method_get_tab_bar>`\ (\ ) |const| |
  61. +-----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
  62. | :ref:`Texture2D<class_Texture2D>` | :ref:`get_tab_button_icon<class_TabContainer_method_get_tab_button_icon>`\ (\ tab_idx\: :ref:`int<class_int>`\ ) |const| |
  63. +-----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
  64. | :ref:`Control<class_Control>` | :ref:`get_tab_control<class_TabContainer_method_get_tab_control>`\ (\ tab_idx\: :ref:`int<class_int>`\ ) |const| |
  65. +-----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
  66. | :ref:`int<class_int>` | :ref:`get_tab_count<class_TabContainer_method_get_tab_count>`\ (\ ) |const| |
  67. +-----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
  68. | :ref:`Texture2D<class_Texture2D>` | :ref:`get_tab_icon<class_TabContainer_method_get_tab_icon>`\ (\ tab_idx\: :ref:`int<class_int>`\ ) |const| |
  69. +-----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
  70. | :ref:`int<class_int>` | :ref:`get_tab_idx_at_point<class_TabContainer_method_get_tab_idx_at_point>`\ (\ point\: :ref:`Vector2<class_Vector2>`\ ) |const| |
  71. +-----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
  72. | :ref:`int<class_int>` | :ref:`get_tab_idx_from_control<class_TabContainer_method_get_tab_idx_from_control>`\ (\ control\: :ref:`Control<class_Control>`\ ) |const| |
  73. +-----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
  74. | :ref:`Variant<class_Variant>` | :ref:`get_tab_metadata<class_TabContainer_method_get_tab_metadata>`\ (\ tab_idx\: :ref:`int<class_int>`\ ) |const| |
  75. +-----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
  76. | :ref:`String<class_String>` | :ref:`get_tab_title<class_TabContainer_method_get_tab_title>`\ (\ tab_idx\: :ref:`int<class_int>`\ ) |const| |
  77. +-----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
  78. | :ref:`bool<class_bool>` | :ref:`is_tab_disabled<class_TabContainer_method_is_tab_disabled>`\ (\ tab_idx\: :ref:`int<class_int>`\ ) |const| |
  79. +-----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
  80. | :ref:`bool<class_bool>` | :ref:`is_tab_hidden<class_TabContainer_method_is_tab_hidden>`\ (\ tab_idx\: :ref:`int<class_int>`\ ) |const| |
  81. +-----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
  82. | :ref:`bool<class_bool>` | :ref:`select_next_available<class_TabContainer_method_select_next_available>`\ (\ ) |
  83. +-----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
  84. | :ref:`bool<class_bool>` | :ref:`select_previous_available<class_TabContainer_method_select_previous_available>`\ (\ ) |
  85. +-----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
  86. | |void| | :ref:`set_popup<class_TabContainer_method_set_popup>`\ (\ popup\: :ref:`Node<class_Node>`\ ) |
  87. +-----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
  88. | |void| | :ref:`set_tab_button_icon<class_TabContainer_method_set_tab_button_icon>`\ (\ tab_idx\: :ref:`int<class_int>`, icon\: :ref:`Texture2D<class_Texture2D>`\ ) |
  89. +-----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
  90. | |void| | :ref:`set_tab_disabled<class_TabContainer_method_set_tab_disabled>`\ (\ tab_idx\: :ref:`int<class_int>`, disabled\: :ref:`bool<class_bool>`\ ) |
  91. +-----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
  92. | |void| | :ref:`set_tab_hidden<class_TabContainer_method_set_tab_hidden>`\ (\ tab_idx\: :ref:`int<class_int>`, hidden\: :ref:`bool<class_bool>`\ ) |
  93. +-----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
  94. | |void| | :ref:`set_tab_icon<class_TabContainer_method_set_tab_icon>`\ (\ tab_idx\: :ref:`int<class_int>`, icon\: :ref:`Texture2D<class_Texture2D>`\ ) |
  95. +-----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
  96. | |void| | :ref:`set_tab_metadata<class_TabContainer_method_set_tab_metadata>`\ (\ tab_idx\: :ref:`int<class_int>`, metadata\: :ref:`Variant<class_Variant>`\ ) |
  97. +-----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
  98. | |void| | :ref:`set_tab_title<class_TabContainer_method_set_tab_title>`\ (\ tab_idx\: :ref:`int<class_int>`, title\: :ref:`String<class_String>`\ ) |
  99. +-----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
  100. .. rst-class:: classref-reftable-group
  101. Theme Properties
  102. ----------------
  103. .. table::
  104. :widths: auto
  105. +-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+
  106. | :ref:`Color<class_Color>` | :ref:`drop_mark_color<class_TabContainer_theme_color_drop_mark_color>` | ``Color(1, 1, 1, 1)`` |
  107. +-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+
  108. | :ref:`Color<class_Color>` | :ref:`font_disabled_color<class_TabContainer_theme_color_font_disabled_color>` | ``Color(0.875, 0.875, 0.875, 0.5)`` |
  109. +-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+
  110. | :ref:`Color<class_Color>` | :ref:`font_hovered_color<class_TabContainer_theme_color_font_hovered_color>` | ``Color(0.95, 0.95, 0.95, 1)`` |
  111. +-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+
  112. | :ref:`Color<class_Color>` | :ref:`font_outline_color<class_TabContainer_theme_color_font_outline_color>` | ``Color(0, 0, 0, 1)`` |
  113. +-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+
  114. | :ref:`Color<class_Color>` | :ref:`font_selected_color<class_TabContainer_theme_color_font_selected_color>` | ``Color(0.95, 0.95, 0.95, 1)`` |
  115. +-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+
  116. | :ref:`Color<class_Color>` | :ref:`font_unselected_color<class_TabContainer_theme_color_font_unselected_color>` | ``Color(0.7, 0.7, 0.7, 1)`` |
  117. +-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+
  118. | :ref:`int<class_int>` | :ref:`icon_max_width<class_TabContainer_theme_constant_icon_max_width>` | ``0`` |
  119. +-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+
  120. | :ref:`int<class_int>` | :ref:`icon_separation<class_TabContainer_theme_constant_icon_separation>` | ``4`` |
  121. +-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+
  122. | :ref:`int<class_int>` | :ref:`outline_size<class_TabContainer_theme_constant_outline_size>` | ``0`` |
  123. +-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+
  124. | :ref:`int<class_int>` | :ref:`side_margin<class_TabContainer_theme_constant_side_margin>` | ``8`` |
  125. +-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+
  126. | :ref:`Font<class_Font>` | :ref:`font<class_TabContainer_theme_font_font>` | |
  127. +-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+
  128. | :ref:`int<class_int>` | :ref:`font_size<class_TabContainer_theme_font_size_font_size>` | |
  129. +-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+
  130. | :ref:`Texture2D<class_Texture2D>` | :ref:`decrement<class_TabContainer_theme_icon_decrement>` | |
  131. +-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+
  132. | :ref:`Texture2D<class_Texture2D>` | :ref:`decrement_highlight<class_TabContainer_theme_icon_decrement_highlight>` | |
  133. +-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+
  134. | :ref:`Texture2D<class_Texture2D>` | :ref:`drop_mark<class_TabContainer_theme_icon_drop_mark>` | |
  135. +-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+
  136. | :ref:`Texture2D<class_Texture2D>` | :ref:`increment<class_TabContainer_theme_icon_increment>` | |
  137. +-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+
  138. | :ref:`Texture2D<class_Texture2D>` | :ref:`increment_highlight<class_TabContainer_theme_icon_increment_highlight>` | |
  139. +-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+
  140. | :ref:`Texture2D<class_Texture2D>` | :ref:`menu<class_TabContainer_theme_icon_menu>` | |
  141. +-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+
  142. | :ref:`Texture2D<class_Texture2D>` | :ref:`menu_highlight<class_TabContainer_theme_icon_menu_highlight>` | |
  143. +-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+
  144. | :ref:`StyleBox<class_StyleBox>` | :ref:`panel<class_TabContainer_theme_style_panel>` | |
  145. +-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+
  146. | :ref:`StyleBox<class_StyleBox>` | :ref:`tab_disabled<class_TabContainer_theme_style_tab_disabled>` | |
  147. +-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+
  148. | :ref:`StyleBox<class_StyleBox>` | :ref:`tab_focus<class_TabContainer_theme_style_tab_focus>` | |
  149. +-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+
  150. | :ref:`StyleBox<class_StyleBox>` | :ref:`tab_hovered<class_TabContainer_theme_style_tab_hovered>` | |
  151. +-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+
  152. | :ref:`StyleBox<class_StyleBox>` | :ref:`tab_selected<class_TabContainer_theme_style_tab_selected>` | |
  153. +-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+
  154. | :ref:`StyleBox<class_StyleBox>` | :ref:`tab_unselected<class_TabContainer_theme_style_tab_unselected>` | |
  155. +-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+
  156. | :ref:`StyleBox<class_StyleBox>` | :ref:`tabbar_background<class_TabContainer_theme_style_tabbar_background>` | |
  157. +-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+
  158. .. rst-class:: classref-section-separator
  159. ----
  160. .. rst-class:: classref-descriptions-group
  161. Signals
  162. -------
  163. .. _class_TabContainer_signal_active_tab_rearranged:
  164. .. rst-class:: classref-signal
  165. **active_tab_rearranged**\ (\ idx_to\: :ref:`int<class_int>`\ )
  166. Emitted when the active tab is rearranged via mouse drag. See :ref:`drag_to_rearrange_enabled<class_TabContainer_property_drag_to_rearrange_enabled>`.
  167. .. rst-class:: classref-item-separator
  168. ----
  169. .. _class_TabContainer_signal_pre_popup_pressed:
  170. .. rst-class:: classref-signal
  171. **pre_popup_pressed**\ (\ )
  172. Emitted when the **TabContainer**'s :ref:`Popup<class_Popup>` button is clicked. See :ref:`set_popup<class_TabContainer_method_set_popup>` for details.
  173. .. rst-class:: classref-item-separator
  174. ----
  175. .. _class_TabContainer_signal_tab_button_pressed:
  176. .. rst-class:: classref-signal
  177. **tab_button_pressed**\ (\ tab\: :ref:`int<class_int>`\ )
  178. Emitted when the user clicks on the button icon on this tab.
  179. .. rst-class:: classref-item-separator
  180. ----
  181. .. _class_TabContainer_signal_tab_changed:
  182. .. rst-class:: classref-signal
  183. **tab_changed**\ (\ tab\: :ref:`int<class_int>`\ )
  184. Emitted when switching to another tab.
  185. .. rst-class:: classref-item-separator
  186. ----
  187. .. _class_TabContainer_signal_tab_clicked:
  188. .. rst-class:: classref-signal
  189. **tab_clicked**\ (\ tab\: :ref:`int<class_int>`\ )
  190. Emitted when a tab is clicked, even if it is the current tab.
  191. .. rst-class:: classref-item-separator
  192. ----
  193. .. _class_TabContainer_signal_tab_hovered:
  194. .. rst-class:: classref-signal
  195. **tab_hovered**\ (\ tab\: :ref:`int<class_int>`\ )
  196. Emitted when a tab is hovered by the mouse.
  197. .. rst-class:: classref-item-separator
  198. ----
  199. .. _class_TabContainer_signal_tab_selected:
  200. .. rst-class:: classref-signal
  201. **tab_selected**\ (\ tab\: :ref:`int<class_int>`\ )
  202. Emitted when a tab is selected via click, directional input, or script, even if it is the current tab.
  203. .. rst-class:: classref-section-separator
  204. ----
  205. .. rst-class:: classref-descriptions-group
  206. Enumerations
  207. ------------
  208. .. _enum_TabContainer_TabPosition:
  209. .. rst-class:: classref-enumeration
  210. enum **TabPosition**:
  211. .. _class_TabContainer_constant_POSITION_TOP:
  212. .. rst-class:: classref-enumeration-constant
  213. :ref:`TabPosition<enum_TabContainer_TabPosition>` **POSITION_TOP** = ``0``
  214. Places the tab bar at the top.
  215. .. _class_TabContainer_constant_POSITION_BOTTOM:
  216. .. rst-class:: classref-enumeration-constant
  217. :ref:`TabPosition<enum_TabContainer_TabPosition>` **POSITION_BOTTOM** = ``1``
  218. Places the tab bar at the bottom. The tab bar's :ref:`StyleBox<class_StyleBox>` will be flipped vertically.
  219. .. _class_TabContainer_constant_POSITION_MAX:
  220. .. rst-class:: classref-enumeration-constant
  221. :ref:`TabPosition<enum_TabContainer_TabPosition>` **POSITION_MAX** = ``2``
  222. Represents the size of the :ref:`TabPosition<enum_TabContainer_TabPosition>` enum.
  223. .. rst-class:: classref-section-separator
  224. ----
  225. .. rst-class:: classref-descriptions-group
  226. Property Descriptions
  227. ---------------------
  228. .. _class_TabContainer_property_all_tabs_in_front:
  229. .. rst-class:: classref-property
  230. :ref:`bool<class_bool>` **all_tabs_in_front** = ``false``
  231. .. rst-class:: classref-property-setget
  232. - |void| **set_all_tabs_in_front**\ (\ value\: :ref:`bool<class_bool>`\ )
  233. - :ref:`bool<class_bool>` **is_all_tabs_in_front**\ (\ )
  234. If ``true``, all tabs are drawn in front of the panel. If ``false``, inactive tabs are drawn behind the panel.
  235. .. rst-class:: classref-item-separator
  236. ----
  237. .. _class_TabContainer_property_clip_tabs:
  238. .. rst-class:: classref-property
  239. :ref:`bool<class_bool>` **clip_tabs** = ``true``
  240. .. rst-class:: classref-property-setget
  241. - |void| **set_clip_tabs**\ (\ value\: :ref:`bool<class_bool>`\ )
  242. - :ref:`bool<class_bool>` **get_clip_tabs**\ (\ )
  243. If ``true``, tabs overflowing this node's width will be hidden, displaying two navigation buttons instead. Otherwise, this node's minimum size is updated so that all tabs are visible.
  244. .. rst-class:: classref-item-separator
  245. ----
  246. .. _class_TabContainer_property_current_tab:
  247. .. rst-class:: classref-property
  248. :ref:`int<class_int>` **current_tab** = ``-1``
  249. .. rst-class:: classref-property-setget
  250. - |void| **set_current_tab**\ (\ value\: :ref:`int<class_int>`\ )
  251. - :ref:`int<class_int>` **get_current_tab**\ (\ )
  252. The current tab index. When set, this index's :ref:`Control<class_Control>` node's ``visible`` property is set to ``true`` and all others are set to ``false``.
  253. A value of ``-1`` means that no tab is selected.
  254. .. rst-class:: classref-item-separator
  255. ----
  256. .. _class_TabContainer_property_deselect_enabled:
  257. .. rst-class:: classref-property
  258. :ref:`bool<class_bool>` **deselect_enabled** = ``false``
  259. .. rst-class:: classref-property-setget
  260. - |void| **set_deselect_enabled**\ (\ value\: :ref:`bool<class_bool>`\ )
  261. - :ref:`bool<class_bool>` **get_deselect_enabled**\ (\ )
  262. If ``true``, all tabs can be deselected so that no tab is selected. Click on the :ref:`current_tab<class_TabContainer_property_current_tab>` to deselect it.
  263. Only the tab header will be shown if no tabs are selected.
  264. .. rst-class:: classref-item-separator
  265. ----
  266. .. _class_TabContainer_property_drag_to_rearrange_enabled:
  267. .. rst-class:: classref-property
  268. :ref:`bool<class_bool>` **drag_to_rearrange_enabled** = ``false``
  269. .. rst-class:: classref-property-setget
  270. - |void| **set_drag_to_rearrange_enabled**\ (\ value\: :ref:`bool<class_bool>`\ )
  271. - :ref:`bool<class_bool>` **get_drag_to_rearrange_enabled**\ (\ )
  272. If ``true``, tabs can be rearranged with mouse drag.
  273. .. rst-class:: classref-item-separator
  274. ----
  275. .. _class_TabContainer_property_tab_alignment:
  276. .. rst-class:: classref-property
  277. :ref:`AlignmentMode<enum_TabBar_AlignmentMode>` **tab_alignment** = ``0``
  278. .. rst-class:: classref-property-setget
  279. - |void| **set_tab_alignment**\ (\ value\: :ref:`AlignmentMode<enum_TabBar_AlignmentMode>`\ )
  280. - :ref:`AlignmentMode<enum_TabBar_AlignmentMode>` **get_tab_alignment**\ (\ )
  281. Sets the position at which tabs will be placed. See :ref:`AlignmentMode<enum_TabBar_AlignmentMode>` for details.
  282. .. rst-class:: classref-item-separator
  283. ----
  284. .. _class_TabContainer_property_tab_focus_mode:
  285. .. rst-class:: classref-property
  286. :ref:`FocusMode<enum_Control_FocusMode>` **tab_focus_mode** = ``2``
  287. .. rst-class:: classref-property-setget
  288. - |void| **set_tab_focus_mode**\ (\ value\: :ref:`FocusMode<enum_Control_FocusMode>`\ )
  289. - :ref:`FocusMode<enum_Control_FocusMode>` **get_tab_focus_mode**\ (\ )
  290. The focus access mode for the internal :ref:`TabBar<class_TabBar>` node.
  291. .. rst-class:: classref-item-separator
  292. ----
  293. .. _class_TabContainer_property_tabs_position:
  294. .. rst-class:: classref-property
  295. :ref:`TabPosition<enum_TabContainer_TabPosition>` **tabs_position** = ``0``
  296. .. rst-class:: classref-property-setget
  297. - |void| **set_tabs_position**\ (\ value\: :ref:`TabPosition<enum_TabContainer_TabPosition>`\ )
  298. - :ref:`TabPosition<enum_TabContainer_TabPosition>` **get_tabs_position**\ (\ )
  299. Sets the position of the tab bar. See :ref:`TabPosition<enum_TabContainer_TabPosition>` for details.
  300. .. rst-class:: classref-item-separator
  301. ----
  302. .. _class_TabContainer_property_tabs_rearrange_group:
  303. .. rst-class:: classref-property
  304. :ref:`int<class_int>` **tabs_rearrange_group** = ``-1``
  305. .. rst-class:: classref-property-setget
  306. - |void| **set_tabs_rearrange_group**\ (\ value\: :ref:`int<class_int>`\ )
  307. - :ref:`int<class_int>` **get_tabs_rearrange_group**\ (\ )
  308. **TabContainer**\ s with the same rearrange group ID will allow dragging the tabs between them. Enable drag with :ref:`drag_to_rearrange_enabled<class_TabContainer_property_drag_to_rearrange_enabled>`.
  309. Setting this to ``-1`` will disable rearranging between **TabContainer**\ s.
  310. .. rst-class:: classref-item-separator
  311. ----
  312. .. _class_TabContainer_property_tabs_visible:
  313. .. rst-class:: classref-property
  314. :ref:`bool<class_bool>` **tabs_visible** = ``true``
  315. .. rst-class:: classref-property-setget
  316. - |void| **set_tabs_visible**\ (\ value\: :ref:`bool<class_bool>`\ )
  317. - :ref:`bool<class_bool>` **are_tabs_visible**\ (\ )
  318. If ``true``, tabs are visible. If ``false``, tabs' content and titles are hidden.
  319. .. rst-class:: classref-item-separator
  320. ----
  321. .. _class_TabContainer_property_use_hidden_tabs_for_min_size:
  322. .. rst-class:: classref-property
  323. :ref:`bool<class_bool>` **use_hidden_tabs_for_min_size** = ``false``
  324. .. rst-class:: classref-property-setget
  325. - |void| **set_use_hidden_tabs_for_min_size**\ (\ value\: :ref:`bool<class_bool>`\ )
  326. - :ref:`bool<class_bool>` **get_use_hidden_tabs_for_min_size**\ (\ )
  327. If ``true``, child :ref:`Control<class_Control>` nodes that are hidden have their minimum size take into account in the total, instead of only the currently visible one.
  328. .. rst-class:: classref-section-separator
  329. ----
  330. .. rst-class:: classref-descriptions-group
  331. Method Descriptions
  332. -------------------
  333. .. _class_TabContainer_method_get_current_tab_control:
  334. .. rst-class:: classref-method
  335. :ref:`Control<class_Control>` **get_current_tab_control**\ (\ ) |const|
  336. Returns the child :ref:`Control<class_Control>` node located at the active tab index.
  337. .. rst-class:: classref-item-separator
  338. ----
  339. .. _class_TabContainer_method_get_popup:
  340. .. rst-class:: classref-method
  341. :ref:`Popup<class_Popup>` **get_popup**\ (\ ) |const|
  342. Returns the :ref:`Popup<class_Popup>` node instance if one has been set already with :ref:`set_popup<class_TabContainer_method_set_popup>`.
  343. \ **Warning:** This is a required internal node, removing and freeing it may cause a crash. If you wish to hide it or any of its children, use their :ref:`Window.visible<class_Window_property_visible>` property.
  344. .. rst-class:: classref-item-separator
  345. ----
  346. .. _class_TabContainer_method_get_previous_tab:
  347. .. rst-class:: classref-method
  348. :ref:`int<class_int>` **get_previous_tab**\ (\ ) |const|
  349. Returns the previously active tab index.
  350. .. rst-class:: classref-item-separator
  351. ----
  352. .. _class_TabContainer_method_get_tab_bar:
  353. .. rst-class:: classref-method
  354. :ref:`TabBar<class_TabBar>` **get_tab_bar**\ (\ ) |const|
  355. Returns the :ref:`TabBar<class_TabBar>` contained in this container.
  356. \ **Warning:** This is a required internal node, removing and freeing it or editing its tabs may cause a crash. If you wish to edit the tabs, use the methods provided in **TabContainer**.
  357. .. rst-class:: classref-item-separator
  358. ----
  359. .. _class_TabContainer_method_get_tab_button_icon:
  360. .. rst-class:: classref-method
  361. :ref:`Texture2D<class_Texture2D>` **get_tab_button_icon**\ (\ tab_idx\: :ref:`int<class_int>`\ ) |const|
  362. Returns the button icon from the tab at index ``tab_idx``.
  363. .. rst-class:: classref-item-separator
  364. ----
  365. .. _class_TabContainer_method_get_tab_control:
  366. .. rst-class:: classref-method
  367. :ref:`Control<class_Control>` **get_tab_control**\ (\ tab_idx\: :ref:`int<class_int>`\ ) |const|
  368. Returns the :ref:`Control<class_Control>` node from the tab at index ``tab_idx``.
  369. .. rst-class:: classref-item-separator
  370. ----
  371. .. _class_TabContainer_method_get_tab_count:
  372. .. rst-class:: classref-method
  373. :ref:`int<class_int>` **get_tab_count**\ (\ ) |const|
  374. Returns the number of tabs.
  375. .. rst-class:: classref-item-separator
  376. ----
  377. .. _class_TabContainer_method_get_tab_icon:
  378. .. rst-class:: classref-method
  379. :ref:`Texture2D<class_Texture2D>` **get_tab_icon**\ (\ tab_idx\: :ref:`int<class_int>`\ ) |const|
  380. Returns the :ref:`Texture2D<class_Texture2D>` for the tab at index ``tab_idx`` or ``null`` if the tab has no :ref:`Texture2D<class_Texture2D>`.
  381. .. rst-class:: classref-item-separator
  382. ----
  383. .. _class_TabContainer_method_get_tab_idx_at_point:
  384. .. rst-class:: classref-method
  385. :ref:`int<class_int>` **get_tab_idx_at_point**\ (\ point\: :ref:`Vector2<class_Vector2>`\ ) |const|
  386. Returns the index of the tab at local coordinates ``point``. Returns ``-1`` if the point is outside the control boundaries or if there's no tab at the queried position.
  387. .. rst-class:: classref-item-separator
  388. ----
  389. .. _class_TabContainer_method_get_tab_idx_from_control:
  390. .. rst-class:: classref-method
  391. :ref:`int<class_int>` **get_tab_idx_from_control**\ (\ control\: :ref:`Control<class_Control>`\ ) |const|
  392. Returns the index of the tab tied to the given ``control``. The control must be a child of the **TabContainer**.
  393. .. rst-class:: classref-item-separator
  394. ----
  395. .. _class_TabContainer_method_get_tab_metadata:
  396. .. rst-class:: classref-method
  397. :ref:`Variant<class_Variant>` **get_tab_metadata**\ (\ tab_idx\: :ref:`int<class_int>`\ ) |const|
  398. Returns the metadata value set to the tab at index ``tab_idx`` using :ref:`set_tab_metadata<class_TabContainer_method_set_tab_metadata>`. If no metadata was previously set, returns ``null`` by default.
  399. .. rst-class:: classref-item-separator
  400. ----
  401. .. _class_TabContainer_method_get_tab_title:
  402. .. rst-class:: classref-method
  403. :ref:`String<class_String>` **get_tab_title**\ (\ tab_idx\: :ref:`int<class_int>`\ ) |const|
  404. Returns the title of the tab at index ``tab_idx``. Tab titles default to the name of the indexed child node, but this can be overridden with :ref:`set_tab_title<class_TabContainer_method_set_tab_title>`.
  405. .. rst-class:: classref-item-separator
  406. ----
  407. .. _class_TabContainer_method_is_tab_disabled:
  408. .. rst-class:: classref-method
  409. :ref:`bool<class_bool>` **is_tab_disabled**\ (\ tab_idx\: :ref:`int<class_int>`\ ) |const|
  410. Returns ``true`` if the tab at index ``tab_idx`` is disabled.
  411. .. rst-class:: classref-item-separator
  412. ----
  413. .. _class_TabContainer_method_is_tab_hidden:
  414. .. rst-class:: classref-method
  415. :ref:`bool<class_bool>` **is_tab_hidden**\ (\ tab_idx\: :ref:`int<class_int>`\ ) |const|
  416. Returns ``true`` if the tab at index ``tab_idx`` is hidden.
  417. .. rst-class:: classref-item-separator
  418. ----
  419. .. _class_TabContainer_method_select_next_available:
  420. .. rst-class:: classref-method
  421. :ref:`bool<class_bool>` **select_next_available**\ (\ )
  422. Selects the first available tab with greater index than the currently selected. Returns ``true`` if tab selection changed.
  423. .. rst-class:: classref-item-separator
  424. ----
  425. .. _class_TabContainer_method_select_previous_available:
  426. .. rst-class:: classref-method
  427. :ref:`bool<class_bool>` **select_previous_available**\ (\ )
  428. Selects the first available tab with lower index than the currently selected. Returns ``true`` if tab selection changed.
  429. .. rst-class:: classref-item-separator
  430. ----
  431. .. _class_TabContainer_method_set_popup:
  432. .. rst-class:: classref-method
  433. |void| **set_popup**\ (\ popup\: :ref:`Node<class_Node>`\ )
  434. If set on a :ref:`Popup<class_Popup>` node instance, a popup menu icon appears in the top-right corner of the **TabContainer** (setting it to ``null`` will make it go away). Clicking it will expand the :ref:`Popup<class_Popup>` node.
  435. .. rst-class:: classref-item-separator
  436. ----
  437. .. _class_TabContainer_method_set_tab_button_icon:
  438. .. rst-class:: classref-method
  439. |void| **set_tab_button_icon**\ (\ tab_idx\: :ref:`int<class_int>`, icon\: :ref:`Texture2D<class_Texture2D>`\ )
  440. Sets the button icon from the tab at index ``tab_idx``.
  441. .. rst-class:: classref-item-separator
  442. ----
  443. .. _class_TabContainer_method_set_tab_disabled:
  444. .. rst-class:: classref-method
  445. |void| **set_tab_disabled**\ (\ tab_idx\: :ref:`int<class_int>`, disabled\: :ref:`bool<class_bool>`\ )
  446. If ``disabled`` is ``true``, disables the tab at index ``tab_idx``, making it non-interactable.
  447. .. rst-class:: classref-item-separator
  448. ----
  449. .. _class_TabContainer_method_set_tab_hidden:
  450. .. rst-class:: classref-method
  451. |void| **set_tab_hidden**\ (\ tab_idx\: :ref:`int<class_int>`, hidden\: :ref:`bool<class_bool>`\ )
  452. If ``hidden`` is ``true``, hides the tab at index ``tab_idx``, making it disappear from the tab area.
  453. .. rst-class:: classref-item-separator
  454. ----
  455. .. _class_TabContainer_method_set_tab_icon:
  456. .. rst-class:: classref-method
  457. |void| **set_tab_icon**\ (\ tab_idx\: :ref:`int<class_int>`, icon\: :ref:`Texture2D<class_Texture2D>`\ )
  458. Sets an icon for the tab at index ``tab_idx``.
  459. .. rst-class:: classref-item-separator
  460. ----
  461. .. _class_TabContainer_method_set_tab_metadata:
  462. .. rst-class:: classref-method
  463. |void| **set_tab_metadata**\ (\ tab_idx\: :ref:`int<class_int>`, metadata\: :ref:`Variant<class_Variant>`\ )
  464. Sets the metadata value for the tab at index ``tab_idx``, which can be retrieved later using :ref:`get_tab_metadata<class_TabContainer_method_get_tab_metadata>`.
  465. .. rst-class:: classref-item-separator
  466. ----
  467. .. _class_TabContainer_method_set_tab_title:
  468. .. rst-class:: classref-method
  469. |void| **set_tab_title**\ (\ tab_idx\: :ref:`int<class_int>`, title\: :ref:`String<class_String>`\ )
  470. Sets a custom title for the tab at index ``tab_idx`` (tab titles default to the name of the indexed child node). Set it back to the child's name to make the tab default to it again.
  471. .. rst-class:: classref-section-separator
  472. ----
  473. .. rst-class:: classref-descriptions-group
  474. Theme Property Descriptions
  475. ---------------------------
  476. .. _class_TabContainer_theme_color_drop_mark_color:
  477. .. rst-class:: classref-themeproperty
  478. :ref:`Color<class_Color>` **drop_mark_color** = ``Color(1, 1, 1, 1)``
  479. Modulation color for the :ref:`drop_mark<class_TabContainer_theme_icon_drop_mark>` icon.
  480. .. rst-class:: classref-item-separator
  481. ----
  482. .. _class_TabContainer_theme_color_font_disabled_color:
  483. .. rst-class:: classref-themeproperty
  484. :ref:`Color<class_Color>` **font_disabled_color** = ``Color(0.875, 0.875, 0.875, 0.5)``
  485. Font color of disabled tabs.
  486. .. rst-class:: classref-item-separator
  487. ----
  488. .. _class_TabContainer_theme_color_font_hovered_color:
  489. .. rst-class:: classref-themeproperty
  490. :ref:`Color<class_Color>` **font_hovered_color** = ``Color(0.95, 0.95, 0.95, 1)``
  491. Font color of the currently hovered tab.
  492. .. rst-class:: classref-item-separator
  493. ----
  494. .. _class_TabContainer_theme_color_font_outline_color:
  495. .. rst-class:: classref-themeproperty
  496. :ref:`Color<class_Color>` **font_outline_color** = ``Color(0, 0, 0, 1)``
  497. The tint of text outline of the tab name.
  498. .. rst-class:: classref-item-separator
  499. ----
  500. .. _class_TabContainer_theme_color_font_selected_color:
  501. .. rst-class:: classref-themeproperty
  502. :ref:`Color<class_Color>` **font_selected_color** = ``Color(0.95, 0.95, 0.95, 1)``
  503. Font color of the currently selected tab.
  504. .. rst-class:: classref-item-separator
  505. ----
  506. .. _class_TabContainer_theme_color_font_unselected_color:
  507. .. rst-class:: classref-themeproperty
  508. :ref:`Color<class_Color>` **font_unselected_color** = ``Color(0.7, 0.7, 0.7, 1)``
  509. Font color of the other, unselected tabs.
  510. .. rst-class:: classref-item-separator
  511. ----
  512. .. _class_TabContainer_theme_constant_icon_max_width:
  513. .. rst-class:: classref-themeproperty
  514. :ref:`int<class_int>` **icon_max_width** = ``0``
  515. The maximum allowed width of the tab's icon. This limit is applied on top of the default size of the icon, but before the value set with :ref:`TabBar.set_tab_icon_max_width<class_TabBar_method_set_tab_icon_max_width>`. The height is adjusted according to the icon's ratio.
  516. .. rst-class:: classref-item-separator
  517. ----
  518. .. _class_TabContainer_theme_constant_icon_separation:
  519. .. rst-class:: classref-themeproperty
  520. :ref:`int<class_int>` **icon_separation** = ``4``
  521. Space between tab's name and its icon.
  522. .. rst-class:: classref-item-separator
  523. ----
  524. .. _class_TabContainer_theme_constant_outline_size:
  525. .. rst-class:: classref-themeproperty
  526. :ref:`int<class_int>` **outline_size** = ``0``
  527. The size of the tab text outline.
  528. \ **Note:** If using a font with :ref:`FontFile.multichannel_signed_distance_field<class_FontFile_property_multichannel_signed_distance_field>` enabled, its :ref:`FontFile.msdf_pixel_range<class_FontFile_property_msdf_pixel_range>` must be set to at least *twice* the value of :ref:`outline_size<class_TabContainer_theme_constant_outline_size>` for outline rendering to look correct. Otherwise, the outline may appear to be cut off earlier than intended.
  529. .. rst-class:: classref-item-separator
  530. ----
  531. .. _class_TabContainer_theme_constant_side_margin:
  532. .. rst-class:: classref-themeproperty
  533. :ref:`int<class_int>` **side_margin** = ``8``
  534. The space at the left or right edges of the tab bar, accordingly with the current :ref:`tab_alignment<class_TabContainer_property_tab_alignment>`.
  535. The margin is ignored with :ref:`TabBar.ALIGNMENT_RIGHT<class_TabBar_constant_ALIGNMENT_RIGHT>` if the tabs are clipped (see :ref:`clip_tabs<class_TabContainer_property_clip_tabs>`) or a popup has been set (see :ref:`set_popup<class_TabContainer_method_set_popup>`). The margin is always ignored with :ref:`TabBar.ALIGNMENT_CENTER<class_TabBar_constant_ALIGNMENT_CENTER>`.
  536. .. rst-class:: classref-item-separator
  537. ----
  538. .. _class_TabContainer_theme_font_font:
  539. .. rst-class:: classref-themeproperty
  540. :ref:`Font<class_Font>` **font**
  541. The font used to draw tab names.
  542. .. rst-class:: classref-item-separator
  543. ----
  544. .. _class_TabContainer_theme_font_size_font_size:
  545. .. rst-class:: classref-themeproperty
  546. :ref:`int<class_int>` **font_size**
  547. Font size of the tab names.
  548. .. rst-class:: classref-item-separator
  549. ----
  550. .. _class_TabContainer_theme_icon_decrement:
  551. .. rst-class:: classref-themeproperty
  552. :ref:`Texture2D<class_Texture2D>` **decrement**
  553. Icon for the left arrow button that appears when there are too many tabs to fit in the container width. When the button is disabled (i.e. the first tab is visible), it appears semi-transparent.
  554. .. rst-class:: classref-item-separator
  555. ----
  556. .. _class_TabContainer_theme_icon_decrement_highlight:
  557. .. rst-class:: classref-themeproperty
  558. :ref:`Texture2D<class_Texture2D>` **decrement_highlight**
  559. Icon for the left arrow button that appears when there are too many tabs to fit in the container width. Used when the button is being hovered with the cursor.
  560. .. rst-class:: classref-item-separator
  561. ----
  562. .. _class_TabContainer_theme_icon_drop_mark:
  563. .. rst-class:: classref-themeproperty
  564. :ref:`Texture2D<class_Texture2D>` **drop_mark**
  565. Icon shown to indicate where a dragged tab is gonna be dropped (see :ref:`drag_to_rearrange_enabled<class_TabContainer_property_drag_to_rearrange_enabled>`).
  566. .. rst-class:: classref-item-separator
  567. ----
  568. .. _class_TabContainer_theme_icon_increment:
  569. .. rst-class:: classref-themeproperty
  570. :ref:`Texture2D<class_Texture2D>` **increment**
  571. Icon for the right arrow button that appears when there are too many tabs to fit in the container width. When the button is disabled (i.e. the last tab is visible) it appears semi-transparent.
  572. .. rst-class:: classref-item-separator
  573. ----
  574. .. _class_TabContainer_theme_icon_increment_highlight:
  575. .. rst-class:: classref-themeproperty
  576. :ref:`Texture2D<class_Texture2D>` **increment_highlight**
  577. Icon for the right arrow button that appears when there are too many tabs to fit in the container width. Used when the button is being hovered with the cursor.
  578. .. rst-class:: classref-item-separator
  579. ----
  580. .. _class_TabContainer_theme_icon_menu:
  581. .. rst-class:: classref-themeproperty
  582. :ref:`Texture2D<class_Texture2D>` **menu**
  583. The icon for the menu button (see :ref:`set_popup<class_TabContainer_method_set_popup>`).
  584. .. rst-class:: classref-item-separator
  585. ----
  586. .. _class_TabContainer_theme_icon_menu_highlight:
  587. .. rst-class:: classref-themeproperty
  588. :ref:`Texture2D<class_Texture2D>` **menu_highlight**
  589. The icon for the menu button (see :ref:`set_popup<class_TabContainer_method_set_popup>`) when it's being hovered with the cursor.
  590. .. rst-class:: classref-item-separator
  591. ----
  592. .. _class_TabContainer_theme_style_panel:
  593. .. rst-class:: classref-themeproperty
  594. :ref:`StyleBox<class_StyleBox>` **panel**
  595. The style for the background fill.
  596. .. rst-class:: classref-item-separator
  597. ----
  598. .. _class_TabContainer_theme_style_tab_disabled:
  599. .. rst-class:: classref-themeproperty
  600. :ref:`StyleBox<class_StyleBox>` **tab_disabled**
  601. The style of disabled tabs.
  602. .. rst-class:: classref-item-separator
  603. ----
  604. .. _class_TabContainer_theme_style_tab_focus:
  605. .. rst-class:: classref-themeproperty
  606. :ref:`StyleBox<class_StyleBox>` **tab_focus**
  607. :ref:`StyleBox<class_StyleBox>` used when the :ref:`TabBar<class_TabBar>` is focused. The :ref:`tab_focus<class_TabContainer_theme_style_tab_focus>` :ref:`StyleBox<class_StyleBox>` is displayed *over* the base :ref:`StyleBox<class_StyleBox>` of the selected tab, so a partially transparent :ref:`StyleBox<class_StyleBox>` should be used to ensure the base :ref:`StyleBox<class_StyleBox>` remains visible. A :ref:`StyleBox<class_StyleBox>` that represents an outline or an underline works well for this purpose. To disable the focus visual effect, assign a :ref:`StyleBoxEmpty<class_StyleBoxEmpty>` resource. Note that disabling the focus visual effect will harm keyboard/controller navigation usability, so this is not recommended for accessibility reasons.
  608. .. rst-class:: classref-item-separator
  609. ----
  610. .. _class_TabContainer_theme_style_tab_hovered:
  611. .. rst-class:: classref-themeproperty
  612. :ref:`StyleBox<class_StyleBox>` **tab_hovered**
  613. The style of the currently hovered tab.
  614. \ **Note:** This style will be drawn with the same width as :ref:`tab_unselected<class_TabContainer_theme_style_tab_unselected>` at minimum.
  615. .. rst-class:: classref-item-separator
  616. ----
  617. .. _class_TabContainer_theme_style_tab_selected:
  618. .. rst-class:: classref-themeproperty
  619. :ref:`StyleBox<class_StyleBox>` **tab_selected**
  620. The style of the currently selected tab.
  621. .. rst-class:: classref-item-separator
  622. ----
  623. .. _class_TabContainer_theme_style_tab_unselected:
  624. .. rst-class:: classref-themeproperty
  625. :ref:`StyleBox<class_StyleBox>` **tab_unselected**
  626. The style of the other, unselected tabs.
  627. .. rst-class:: classref-item-separator
  628. ----
  629. .. _class_TabContainer_theme_style_tabbar_background:
  630. .. rst-class:: classref-themeproperty
  631. :ref:`StyleBox<class_StyleBox>` **tabbar_background**
  632. The style for the background fill of the :ref:`TabBar<class_TabBar>` area.
  633. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  634. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  635. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  636. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  637. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  638. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
  639. .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
  640. .. |void| replace:: :abbr:`void (No return value.)`