Text Entry Element#
An entry element provides allows users to enter a single line of text, optionally display a hint when no value has been provided.
A new entry can be created with the entry()
function in the
eg-overlay-ui
.
Functions#
Classes#
- class eg-overlay-ui.uientry#
- text([newtext])#
Get or set the value of this text entry.
Version History
Version
Notes
0.3.0
Added
- hint(text)#
Set a text value to be shown in the entry when it is empty.
This is typically a hint or example that can help a user understand what to enter into the entry.
- Parameters:
text (
string
)
Version History
Version
Notes
0.3.0
Added
- prefwidth(pixels)#
Set the preferred width of the text box.
- Parameters:
pixels (
integer
)
Version History
Version
Notes
0.3.0
Added
- addeventhandler(handler, event1[, event2, ...])#
Add an event handler for the given events.
Multiple events can be specified, but at least one is required.
In addition to the standard element events, an entry will also send key events. Key events are named in a
{mod1}-{mod2}-{key}-{updown}
format. For example:ctrl-v-down
orctrl-shift-a-up
, etc.An event handler added with this method can be removed later with
removeeventhandler()
.Version History
Version
Notes
0.3.0
Added
- removeeventhandler(handlerid)#
Removes an event handler.
- Parameters:
handlerid (
integer
) – An event handler id returned byaddeventhandler()
Version History
Version
Notes
0.3.0
Added
Note
The following methods are inherited from
uielement
- x([position])#
Set or get the current position X.
Important
It is normally not necessary to manually position an element.
Version History
Version
Notes
0.3.0
Added
- y([position])#
Set or get the current position Y.
Important
It is normally not necessary to manually position an element.
Version History
Version
Notes
0.3.0
Added
- width([value])#
Get or set the element’s width.
Important
It is normally not necessary to manually set an element’s size.
Version History
Version
Notes
0.3.0
Added
- height([value])#
Get or set the element’s height.
Important
It is normally not necessary to manually set an element’s size.
Version History
Version
Notes
0.3.0
Added