<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.multitheftauto.com/wiki/Astrath:createTabPanel?action=history&amp;feed=atom</id>
	<title>Astrath:createTabPanel - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.multitheftauto.com/wiki/Astrath:createTabPanel?action=history&amp;feed=atom"/>
	<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Astrath:createTabPanel&amp;action=history"/>
	<updated>2026-05-08T06:02:55Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.39.3</generator>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Astrath:createTabPanel&amp;diff=82567&amp;oldid=prev</id>
		<title>Sybellex: Created page with &quot;= DxTabPanel:new =  {{Client function}} {{FuncDef|element DxTabPanel:new ( float posX, float posY, float width, float height, element parent, boolean relative, table color, table tabColor, table activeColor, table hoverColor, string font, float fontsize, string style, string tabStyle )}}  '''Description:''' Creates a new tab panel DX element. A tab panel can hold multiple tabs and manage their selection and hover states. Automatically adjusts child tab positions and size...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Astrath:createTabPanel&amp;diff=82567&amp;oldid=prev"/>
		<updated>2025-10-22T20:19:50Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;= DxTabPanel:new =  {{Client function}} {{FuncDef|element DxTabPanel:new ( float posX, float posY, float width, float height, element parent, boolean relative, table color, table tabColor, table activeColor, table hoverColor, string font, float fontsize, string style, string tabStyle )}}  &amp;#039;&amp;#039;&amp;#039;Description:&amp;#039;&amp;#039;&amp;#039; Creates a new tab panel DX element. A tab panel can hold multiple tabs and manage their selection and hover states. Automatically adjusts child tab positions and size...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;= DxTabPanel:new =&lt;br /&gt;
&lt;br /&gt;
{{Client function}}&lt;br /&gt;
{{FuncDef|element DxTabPanel:new ( float posX, float posY, float width, float height, element parent, boolean relative, table color, table tabColor, table activeColor, table hoverColor, string font, float fontsize, string style, string tabStyle )}}&lt;br /&gt;
&lt;br /&gt;
'''Description:'''&lt;br /&gt;
Creates a new tab panel DX element. A tab panel can hold multiple tabs and manage their selection and hover states. Automatically adjusts child tab positions and sizes.&lt;br /&gt;
&lt;br /&gt;
'''Parameters:'''&lt;br /&gt;
* posX, posY (float) – Position of the tab panel on screen.&lt;br /&gt;
* width, height (float) – Dimensions of the tab panel.&lt;br /&gt;
* parent (element) – Parent DX element to attach this panel to (optional).&lt;br /&gt;
* relative (boolean) – Position relative to parent (optional).&lt;br /&gt;
* color (table / tocolor) – Main background color of the panel (optional, default: dark grey).&lt;br /&gt;
* tabColor (table / tocolor) – Default color for tabs (optional).&lt;br /&gt;
* activeColor (table / tocolor) – Color for the active tab (optional).&lt;br /&gt;
* hoverColor (table / tocolor) – Hover color for tabs (optional).&lt;br /&gt;
* font (string) – Font used for tab text (optional, default: &amp;quot;default-bold&amp;quot;).&lt;br /&gt;
* fontsize (float) – Font size for tab text (optional, default: 1).&lt;br /&gt;
* style (string) – DX style used for the panel (optional).&lt;br /&gt;
* tabStyle (string) – DX style used for tabs (optional).&lt;br /&gt;
&lt;br /&gt;
'''Returns:'''&lt;br /&gt;
: Returns the newly created DxTabPanel element.&lt;br /&gt;
&lt;br /&gt;
'''Methods:'''&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width:100%; border:none;&amp;quot;&lt;br /&gt;
! Method !! Description&lt;br /&gt;
|-&lt;br /&gt;
| Ath:destroy() || Destroys the tab panel and all child tabs and elements.&lt;br /&gt;
|-&lt;br /&gt;
| Ath:setVisible(boolean) || Shows or hides the tab panel.&lt;br /&gt;
|-&lt;br /&gt;
| Ath:setEnabled(boolean) || Enables or disables the tab panel for interaction.&lt;br /&gt;
|-&lt;br /&gt;
| Ath:addTab(text) || Adds a new tab with the given text to the panel.&lt;br /&gt;
|-&lt;br /&gt;
| Ath:getSelected() || Returns the currently selected tab element.&lt;br /&gt;
|-&lt;br /&gt;
| Ath:setSelected(tabElement) || Sets a specific tab as selected.&lt;br /&gt;
|-&lt;br /&gt;
| Ath:setHoverable(boolean) || Enables or disables hover effect for tabs.&lt;br /&gt;
|-&lt;br /&gt;
| Ath:setColor(r, g, b, a, type) || Sets colors for the panel or tabs. Type can be 'mainColor', 'hoverColor', 'tabColor', 'activeColor'.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Example:'''&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local tabPanel = DxTabPanel:new(100, 100, 400, 300)&lt;br /&gt;
tabPanel:setVisible(true)&lt;br /&gt;
tabPanel:addTab(&amp;quot;Tab 1&amp;quot;)&lt;br /&gt;
tabPanel:addTab(&amp;quot;Tab 2&amp;quot;)&lt;br /&gt;
tabPanel:draw()&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''See also:'''&lt;br /&gt;
* [[DxTab:new]] – Page for individual tab elements&lt;br /&gt;
* [[DxWindow:new]] – For window parent reference&lt;br /&gt;
* [[onClientRender]] – Event to render DX elements&lt;/div&gt;</summary>
		<author><name>Sybellex</name></author>
	</entry>
</feed>