The default change handler is called when the return key is
pressed. It can be useful to also call a handler when the widget
loses focus. For that, the addHandlerBlur
method is of
use. (This was the default, but is now not, as it was hard to
decouple the two when that was desirable.)
The default change handler call is when the user activates the
entry by pressing the enter key. Other possible events to consider are
covered by: addhandlerBlur
(when the widget loses focuses)
and addHandlerKeystroke
(called after each keystroke). For
the latter, if the toolkit supports it, the handler's first
argument has a component key
passing back the keystroke
information.
The svalue
method for a edit object refers to its main property, the text in the box.
gedit(
text = "",
width = 25,
coerce.with = NULL,
initial.msg = "",
handler = NULL,
action = NULL,
container = NULL,
...,
toolkit = guiToolkit()
).gedit(
toolkit,
text = "",
width = 25,
coerce.with = NULL,
initial.msg = "",
handler = NULL,
action = NULL,
container = NULL,
...
)
# S3 method for GEdit
addHandlerChanged(obj, handler, action = NULL, ...)
# S3 method for GEdit
svalue(obj, index = NULL, drop = NULL, ...)
initial text
number of characters
A function or name of function to coerce value with before returning by svalue
If no initial text is given but an initial message is, then this message is displayed until the widget receives the focus
Change handler. Called when return key is hit. Use
addHandleBlur
to add a handler when the widget loses focus,
such as through tab-key navigation.
passed to handler
parent container
passed to add
method of parent
toolkit
object receiving event and emitting a signal to the handler
NULL or logical. If TRUE
and widget supports it an index, instead of a value will be returned.
NULL or logical. If widget supports it, drop will work as it does in a data frame or perhaps someother means.
An object of class GEdit
. This has sub-classed methods:
svalue
to retrieve the text
svalue<-
to set the text
[
to get the autocomplete values
[<-
Character. To set autocomplete values
visible<-
to specify a character to display instead of text (for passwords)