EditBox¶
-
class
guerilla.
EditBox
¶ Bases:
guerilla.Window
An edit box window. This window receives text input and notifies edit changes by calling the editchanged method.
-
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
(text)¶ 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.LUA{ 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 }
param text: The new edit box text type text: str
-
getedit
()¶ Returns the edit window withing the editbox
Returns: edit window Return type: the
-