<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.multitheftauto.com/wiki/Astrath:createComboBox?action=history&amp;feed=atom</id>
	<title>Astrath:createComboBox - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.multitheftauto.com/wiki/Astrath:createComboBox?action=history&amp;feed=atom"/>
	<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Astrath:createComboBox&amp;action=history"/>
	<updated>2026-05-07T17:17:53Z</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:createComboBox&amp;diff=82553&amp;oldid=prev</id>
		<title>Sybellex: /* DxCombobox:new / Astrath:createCombobox */</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Astrath:createComboBox&amp;diff=82553&amp;oldid=prev"/>
		<updated>2025-10-22T19:44:57Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;DxCombobox:new / Astrath:createCombobox&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 19:44, 22 October 2025&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;= DxCombobox:new &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;/ Astrath:createCombobox &lt;/del&gt;=&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;= DxCombobox:new =&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{Client function}}&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{Client function}}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l38&quot;&gt;Line 38:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 38:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|-&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|-&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;| Ath:removeItem(number) || Removes an item from the list by its index.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;| Ath:removeItem(number) || Removes an item from the list by its index.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;|-&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;| Ath:onScrollDown() || Scrolls the list down by one item.&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;|-&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;| Ath:onScrollUp() || Scrolls the list up by one item.&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|-&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|-&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;| Ath:clear() || Removes all items from the combobox.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;| Ath:clear() || Removes all items from the combobox.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key wiki-wiki_dev_:diff::1.12:old-82552:rev-82553 --&gt;
&lt;/table&gt;</summary>
		<author><name>Sybellex</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Astrath:createComboBox&amp;diff=82552&amp;oldid=prev</id>
		<title>Sybellex: Created page with &quot;= DxCombobox:new / Astrath:createCombobox =  {{Client function}} {{FuncDef|element DxCombobox:new ( string text, float posX, float posY, float width, float height, element parent, boolean relative, string desc, number maxItems, table color, string font, float fontSize, table scrollColor, table scrollBGColor )}}  '''Description:''' Creates a new DX-based combobox element. Comboboxes allow selecting from a list of items, support scrolling, hover effects, and color customiz...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Astrath:createComboBox&amp;diff=82552&amp;oldid=prev"/>
		<updated>2025-10-22T19:43:32Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;= DxCombobox:new / Astrath:createCombobox =  {{Client function}} {{FuncDef|element DxCombobox:new ( string text, float posX, float posY, float width, float height, element parent, boolean relative, string desc, number maxItems, table color, string font, float fontSize, table scrollColor, table scrollBGColor )}}  &amp;#039;&amp;#039;&amp;#039;Description:&amp;#039;&amp;#039;&amp;#039; Creates a new DX-based combobox element. Comboboxes allow selecting from a list of items, support scrolling, hover effects, and color customiz...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;= DxCombobox:new / Astrath:createCombobox =&lt;br /&gt;
&lt;br /&gt;
{{Client function}}&lt;br /&gt;
{{FuncDef|element DxCombobox:new ( string text, float posX, float posY, float width, float height, element parent, boolean relative, string desc, number maxItems, table color, string font, float fontSize, table scrollColor, table scrollBGColor )}}&lt;br /&gt;
&lt;br /&gt;
'''Description:'''&lt;br /&gt;
Creates a new DX-based combobox element. Comboboxes allow selecting from a list of items, support scrolling, hover effects, and color customization. Each combobox instance is automatically registered in the DX library.&lt;br /&gt;
&lt;br /&gt;
'''Parameters:'''&lt;br /&gt;
* text (string) – The default text displayed on the combobox.&lt;br /&gt;
* posX, posY (float) – Position on screen.&lt;br /&gt;
* width, height (float) – Size of the combobox.&lt;br /&gt;
* parent (element) – Parent DX element to attach this combobox to (optional).&lt;br /&gt;
* relative (boolean) – Position relative to parent (optional).&lt;br /&gt;
* desc (string) – Default placeholder text when no item is selected (optional).&lt;br /&gt;
* maxItems (number) – Maximum number of items displayed at once (optional, default: 10).&lt;br /&gt;
* color (table / tocolor) – Base color for bar, button, and body (optional).&lt;br /&gt;
* font (string) – Font used for text (optional, default: &amp;quot;default-bold&amp;quot;).&lt;br /&gt;
* fontSize (float) – Font size multiplier (optional, default: 1).&lt;br /&gt;
* scrollColor, scrollBGColor (table / tocolor) – Scrollbar colors (optional).&lt;br /&gt;
&lt;br /&gt;
'''Returns:'''&lt;br /&gt;
: Returns the newly created DxCombobox 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 combobox and all its child elements.&lt;br /&gt;
|-&lt;br /&gt;
| Ath:setVisible(boolean) || Shows or hides the combobox.&lt;br /&gt;
|-&lt;br /&gt;
| Ath:setEnabled(boolean) || Enables or disables the combobox for interaction.&lt;br /&gt;
|-&lt;br /&gt;
| Ath:setText(string) || Sets the text displayed on the combobox.&lt;br /&gt;
|-&lt;br /&gt;
| Ath:addItem(string) || Adds a new item to the combobox list.&lt;br /&gt;
|-&lt;br /&gt;
| Ath:removeItem(number) || Removes an item from the list by its index.&lt;br /&gt;
|-&lt;br /&gt;
| Ath:onScrollDown() || Scrolls the list down by one item.&lt;br /&gt;
|-&lt;br /&gt;
| Ath:onScrollUp() || Scrolls the list up by one item.&lt;br /&gt;
|-&lt;br /&gt;
| Ath:clear() || Removes all items from the combobox.&lt;br /&gt;
|-&lt;br /&gt;
| Ath:setItemText(number, string) || Updates the text of an item at a given index.&lt;br /&gt;
|-&lt;br /&gt;
| Ath:getItemText(number) || Returns the text of an item by index.&lt;br /&gt;
|-&lt;br /&gt;
| Ath:setSelected(number) || Sets the selected item by index.&lt;br /&gt;
|-&lt;br /&gt;
| Ath:getSelected() || Returns the index of the currently selected item.&lt;br /&gt;
|-&lt;br /&gt;
| Ath:getItemCount() || Returns the total number of items in the combobox.&lt;br /&gt;
|-&lt;br /&gt;
| Ath:setHoverable(boolean) || Enables or disables hover effect.&lt;br /&gt;
|-&lt;br /&gt;
| Ath:setColor(r, g, b, a, type) || Sets the color of bar, button, body, or hover.&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;
-- Create a combobox at position 400x200 with size 150x25&lt;br /&gt;
local myCombo = DxCombobox:new(&amp;quot;Select Item&amp;quot;, 400, 200, 150, 25)&lt;br /&gt;
&lt;br /&gt;
-- Add items&lt;br /&gt;
myCombo:addItem(&amp;quot;Option 1&amp;quot;)&lt;br /&gt;
myCombo:addItem(&amp;quot;Option 2&amp;quot;)&lt;br /&gt;
myCombo:addItem(&amp;quot;Option 3&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
-- Show combobox and enable hover&lt;br /&gt;
myCombo:setVisible(true)&lt;br /&gt;
myCombo:setHoverable(true)&lt;br /&gt;
&lt;br /&gt;
-- Select second item&lt;br /&gt;
myCombo:setSelected(2)&lt;br /&gt;
&lt;br /&gt;
-- Change bar color&lt;br /&gt;
myCombo:setColor(255, 255, 255, 255, &amp;quot;barColor&amp;quot;)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''See also:'''&lt;br /&gt;
* [[Astrath]] – Main library page&lt;br /&gt;
* [[DxButton:new]] – Page for button element reference&lt;br /&gt;
* [[DxCheckbox:new]] – Page for checkbox element reference&lt;br /&gt;
* [[onClientRender]] – Event used to render DX elements&lt;/div&gt;</summary>
		<author><name>Sybellex</name></author>
	</entry>
</feed>