gtext: A text area widget

Description Usage Arguments Value Examples

View source: R/gtext.R

Description

A text area widget

Usage

1
2
3
gtext(text = NULL, width = NULL, height = 300, font.attr = NULL,
  wrap = TRUE, handler = NULL, action = NULL, container = NULL, ...,
  ext.args = NULL)

Arguments

text

initial text

width

width in pixels

height

height in pixels

font.attr

Ignored. Default font attributes

wrap

Ignored Do we wrap the tet

handler

optional means (to addHandlerChanged) to specify a handler for the default signal. A handler is a function with signature (h,...) where h is a list with components obj referring to the object emitting the signal, action containing values passed to the action argument, and possible other values.

action

Passed to handler to parameterize a call

container

A parent container. In gWidgetsWWW2 a parent container is not optional (though it can be substituted with the parent argument in some circumstances). The parent specifies the widget heirarchy and the ... argument is used to pass along arguments to layout the child component in the parent container. Typically, these are passed to the add method of the parent container.

...

Used to pass along argument to the parent container's add method and possible other arguments to the underlying ference class constructors.

ext.args

The contructors of gWidgetsWWW2 ultimately call an Ext constructor. The options passed to the Ext constructor may be added to or overridden by use of this argument. Values are passed in as named list components and with values converted into JavaScript objects by asJSObject.

Value

an ExtWidget instance

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
w <- gwindow("gtext example")
sb <- gstatusbar("Powered by gWidgetsWWW and Rook", cont=w)
g <- ggroup(cont=w, horizontal=FALSE)
t <- gtext("Some text with \n new lines", cont=g)
b <- gbutton("click", cont=g, handler=function(h,...) {
  galert(svalue(b), parent=w)
})
 b <- gbutton("change", cont=g, handler=function(h,...) {
   svalue(t) <= "some new text"
})

gWidgetsWWW2 documentation built on May 2, 2019, 6:10 p.m.