Description Usage Arguments Value Note Examples
The multiline text widget has its main property the text contained within.
The svalue
will return a string (length-1 character
vector) with embedded newlines
The "change" handler is addHandlerKeystroke
Use addHandlerSelectionChanged
to monitor the selection
The svalue
method for a gtext object returns a) the buffers
content; b) the selected text (if drop=TRUE
, but not
NULL
), this can be used to set the selected value, as well;
c) the index of the selection if index=TRUE
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 | gtext(
text = NULL,
width = NULL,
height = 300,
font.attr = NULL,
wrap = TRUE,
handler = NULL,
action = NULL,
container = NULL,
...,
toolkit = guiToolkit()
)
.gtext(
toolkit,
text = NULL,
width = NULL,
height = 300,
font.attr = NULL,
wrap = TRUE,
handler = NULL,
action = NULL,
container = NULL,
...
)
insert(
obj,
value,
where = c("end", "beginning", "at.cursor"),
font.attr = NULL,
do.newline = TRUE,
...
)
## S3 method for class 'GText'
insert(
obj,
value,
where = c("end", "beginning", "at.cursor"),
font.attr = NULL,
do.newline = TRUE,
...
)
## S3 method for class 'GText'
dispose(obj, ...)
## S3 method for class 'GText'
svalue(obj, index = NULL, drop = NULL, ...)
|
text |
initial text |
width |
width of widget |
height |
height of widget (when width is specified) |
font.attr |
font attributes for text buffer. One can also specify font attributes for insertion. The font attributes are specified with a list with named components, with names and values coming from:
|
wrap |
logical do lines wrap |
handler |
A handler assigned to the default change
signal. Handlers are called when some event triggers a widget to
emit a signal. For each widget some default signal is assumed, and
handlers may be assigned to that through Handlers may also be added via |
action |
User supplied data passed to the handler when it is called |
container |
A parent container. When a widget is created it can be incorporated into the widget heirarchy by passing in a parent container at construction time. (For some toolkits this is not optional, e.g. gWidgets2tcltk or gWidgets2WWW2.) |
... |
These values are passed to the |
toolkit |
Each widget constructor is passed in the toolkit it
will use. This is typically done using the default, which will
lookup the toolkit through |
obj |
object |
value |
text to insert |
where |
position of insertion |
do.newline |
logical add a newline at end |
index |
NULL or logical. If |
drop |
NULL or logical. If widget supports it, drop will work as it does in a data frame or perhaps someother means. |
called for side effect
with gWidgetstcltk the allocation of size to the
widget may be incorrect. It is best to wait until the widget is
added before displaying its parent window. See the visible
argument for gwindow
.
1 2 3 4 5 6 7 8 9 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.