EditBoxΒΆ
class EditBox
An edit box window. This window receives text input and notifies edit changes by calling the editchanged method.
Hierarchy
Members
Methods:
| editchanged | ( ) | The editchanged method is called when the edit box text is changed (that is, after the edit lost focus or the return key was hit.) |
| editupdated | (
|
The editupdated method is called whenever the edit box text is changed (at every keystroke.) |
| getedit | ( ) | Returns the edit window withing the editbox |
| settext | (
|
Change the content of the edit box |
Inherited from class Window
Methods:
| destroy | ( ) | Destroy the window and all its children windows |
| setx | (
|
Set the X window placement |
| sety | (
|
Set the Y window placement |
| setw | (
|
Set the window width |
| seth | (
|
Set the window height |
| getx | ( ) | Get the window X coordinate in the parent space |
| gety | ( ) | Get the window Y coordinate in the parent space |
| getw | ( ) | Get the window width |
| geth | ( ) | Get the window height |
| hide | ( ) | Hide the window |
| show | ( ) | Show the window |
| disable | ( ) | Disable the window |
| enable | ( ) | Enable the window |
| getnodepath | ( ) | Returns the edited node path (is nil if the method is not supported) |
| setnodepath | (
|
|
| addtracker | (
|
Add a tracker to this window. A tracker receives notification when the tracked window is invalidated or destroyed. A tracker may implement onTrackedDestroyed and onTrackedInvalidated to get notifications on such events |
| removetracker | (
|
Remove a tracker of this window. |
| setcolor | (
|
Change the window color, see also ui.color function |
| getparent | (
|
Get the first parent window of given class (immediate parent if no class is provided) |
| settopmost | ( ) | Set the window as top most in children order |
| getchild | (
|
Get a child window |
| getcontainer | ( ) | Get the main container of a window |
| settitle | (
|
Change the window title |
| setfocus | ( ) | Set the focus to the window |
| getroot | ( ) | Return the root window of this window |
Documentation
The editchanged method is called when the edit box text is changed (that is, after the edit lost focus or the return key was hit.)
The editupdated method is called whenever the edit box text is changed (at every keystroke.)
This method is a callback to implemented if you want the EditBox to react to user changing the content of the edit.
local myedit = ui.editbox ("myedit", parent)
myedit:setx (0)
myedit:sety (0)
myedit:setw (0, 1)
myedit:seth (20)
function myedit:editchanged (text)
print ("myedit has changed: new text is " .. text)
end
Arguments:
text The new edit box text
Returns the edit window withing the editbox
Return:
Edit edit window
Change the content of the edit box
Arguments:
text The new content of the edit box