<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.multitheftauto.com/wiki/Astrath:createEditBox?action=history&amp;feed=atom</id>
	<title>Astrath:createEditBox - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.multitheftauto.com/wiki/Astrath:createEditBox?action=history&amp;feed=atom"/>
	<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Astrath:createEditBox&amp;action=history"/>
	<updated>2026-05-07T11:45:52Z</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:createEditBox&amp;diff=82554&amp;oldid=prev</id>
		<title>Sybellex: Created page with &quot;= DxEdit:new / Astrath:createEditBox =  {{Client function}} {{FuncDef|element DxEdit:new ( string text, float posX, float posY, float width, float height, element parent, boolean relative, string font, float fontsize, string placeholder )}}  '''Description:''' Creates a new DX-based edit box element. Edit boxes allow text input with options for read-only mode, numeric-only input, hover effects, and color customization. Each edit box instance is automatically registered i...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Astrath:createEditBox&amp;diff=82554&amp;oldid=prev"/>
		<updated>2025-10-22T19:48:22Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;= DxEdit:new / Astrath:createEditBox =  {{Client function}} {{FuncDef|element DxEdit:new ( string text, float posX, float posY, float width, float height, element parent, boolean relative, string font, float fontsize, string placeholder )}}  &amp;#039;&amp;#039;&amp;#039;Description:&amp;#039;&amp;#039;&amp;#039; Creates a new DX-based edit box element. Edit boxes allow text input with options for read-only mode, numeric-only input, hover effects, and color customization. Each edit box instance is automatically registered i...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;= DxEdit:new / Astrath:createEditBox =&lt;br /&gt;
&lt;br /&gt;
{{Client function}}&lt;br /&gt;
{{FuncDef|element DxEdit:new ( string text, float posX, float posY, float width, float height, element parent, boolean relative, string font, float fontsize, string placeholder )}}&lt;br /&gt;
&lt;br /&gt;
'''Description:'''&lt;br /&gt;
Creates a new DX-based edit box element. Edit boxes allow text input with options for read-only mode, numeric-only input, hover effects, and color customization. Each edit box instance is automatically registered in the DX library.&lt;br /&gt;
&lt;br /&gt;
'''Parameters:'''&lt;br /&gt;
* text (string) – Initial text for the edit box (optional).&lt;br /&gt;
* posX, posY (float) – Position on screen.&lt;br /&gt;
* width, height (float) – Size of the edit box.&lt;br /&gt;
* parent (element) – Parent DX element to attach this edit box to (optional).&lt;br /&gt;
* relative (boolean) – Position relative to parent (optional).&lt;br /&gt;
* font (string) – Font used for the text (optional, default: &amp;quot;default-bold&amp;quot;).&lt;br /&gt;
* fontsize (float) – Font size multiplier (optional, default: 1).&lt;br /&gt;
* placeholder (string) – Placeholder text when the edit box is empty (optional).&lt;br /&gt;
&lt;br /&gt;
'''Returns:'''&lt;br /&gt;
: Returns the newly created DxEdit 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 edit box and all its child elements.&lt;br /&gt;
|-&lt;br /&gt;
| Ath:clear() || Clears all text and resets the cursor.&lt;br /&gt;
|-&lt;br /&gt;
| Ath:setVisible(boolean) || Shows or hides the edit box.&lt;br /&gt;
|-&lt;br /&gt;
| Ath:setEnabled(boolean) || Enables or disables the edit box for interaction.&lt;br /&gt;
|-&lt;br /&gt;
| Ath:setReadOnly(boolean) || Enables or disables read-only mode.&lt;br /&gt;
|-&lt;br /&gt;
| Ath:setNumericOnly(boolean) || Enables numeric-only input.&lt;br /&gt;
|-&lt;br /&gt;
| Ath:getReadOnly() || Returns whether the edit box is in read-only mode.&lt;br /&gt;
|-&lt;br /&gt;
| Ath:setText(string) || Sets the text of the edit box.&lt;br /&gt;
|-&lt;br /&gt;
| Ath:getText() || Returns the current text of the edit box.&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 main background or hover color of the edit box.&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 an edit box at position 400x200 with size 200x25&lt;br /&gt;
local myEdit = DxEdit:new(&amp;quot;&amp;quot;, 400, 200, 200, 25)&lt;br /&gt;
&lt;br /&gt;
-- Set placeholder text&lt;br /&gt;
myEdit.placeholder = &amp;quot;Enter your name...&amp;quot;&lt;br /&gt;
&lt;br /&gt;
-- Enable numeric only&lt;br /&gt;
myEdit:setNumericOnly(true)&lt;br /&gt;
&lt;br /&gt;
-- Show edit box and enable hover&lt;br /&gt;
myEdit:setVisible(true)&lt;br /&gt;
myEdit:setHoverable(true)&lt;br /&gt;
&lt;br /&gt;
-- Set background color to light grey&lt;br /&gt;
myEdit:setColor(200, 200, 200, 255, &amp;quot;mainColor&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;
* [[DxCombobox:new]] – Page for combobox element reference&lt;br /&gt;
* [[onClientRender]] – Event used to render DX elements&lt;/div&gt;</summary>
		<author><name>Sybellex</name></author>
	</entry>
</feed>