TextArea
Usage​
Client/Index.lua
local textArea = EGUI.TextArea(10, 10, 100, 100)
Constructor Parameters​
Type | Name | Default |
---|---|---|
number | posX | |
number | posY | |
number | width | |
number | height | |
table | parent | nil |
Functions​
Inherited Element Functions
Returns | Name | Description |
---|---|---|
Base Element | SetVisible | Sets element visibility |
boolean | IsVisible | Returns if element is visible |
Base Element | SetAlpha | Sets element alpha |
number | GetAlpha | Returns element alpha |
Base Element | SetPosition | Sets element position |
number , number | GetPosition | Returns element position |
Base Element | SetSize | Sets element size |
number , number | GetSize | Returns element size |
Base Element | SetAlignment | Sets element alignment |
string | GetAlignment | Gets element alignment |
Subscribe | Subscribes to an event | |
Unsubscribe | Unsubscribes from a event |
Inherited Input Functions
Returns | Name | Description |
---|---|---|
Base Input | SetEnabled | Allows enabling/disabling of the input |
boolean | IsEnabled | Whether the input is enabled |
Returns | Name | Description |
---|---|---|
TextArea | SetValue | Sets value of the text area |
string | GetValue | Gets value of the text area |
TextArea | SetPlaceholder | Sets placeholder of the text area |
string | GetPlaceholder | Gets placeholder of the text area |
TextArea | SetMaxLength | Sets max length of the text area |
number | GetMaxLength | Gets max length of the text area |
SetValue​
Sets the value of the text area
Returns the
TextArea
(self)
textArea:SetValue("Value")
Type | Parameter | Default Value | Description |
---|---|---|---|
string | value | The new value |
GetValue​
Gets the value of the text area
Returns a
string
of the current value
local value = textArea:GetValue()
SetPlaceholder​
Sets the placeholder of the text area
Returns the
TextArea
(self)
textArea:SetPlaceholder("Placeholder")
Type | Parameter | Default Value | Description |
---|---|---|---|
string | placeholder | The new placeholder |
GetPlaceholder​
Gets the placeholder of the text area
Returns a
string
local placeholder = textArea:GetPlaceholder()
SetMaxLength​
Sets the max length of the text area value
Returns the
TextArea
(self)
textArea:SetMaxLength(30)
Type | Parameter | Default Value | Description |
---|---|---|---|
number | maxLength | The max length of the text area value |
GetMaxLength​
Gets the max length of the text area value
Returns a
number
local maxLength = textArea:GetMaxLength()
Events​
Name | Description |
---|---|
Change | Triggered when the value of the text area changed |
FocusIn | Triggered when the text area receives the focus |
FocusOut | Triggered when the text area looses the focus |
Change​
Triggered when the value of the text area changed
textArea:Subscribe("Change", function(value)
end)
FocusIn​
Triggered when the text area receives the focus
textArea:Subscribe("FocusIn", function()
end)
FocusOut​
Triggered when the text area looses the focus
textArea:Subscribe("FocusOut", function()
end)