Basic label widget
The basic label widget allows one to label areas of a GUI using text. The most common use would be to label fields in a form. For gWidgets2 labels may be editable or responsive to mouse clicks, although it is the author's experience that such uses are not expected by the end user.
S3 generic whose methods are implemented in the toolkit packages
The svalue
methods refer to the main property of the label, its text.
glabel(text = "", markup = FALSE, editable = FALSE, handler = NULL, action = NULL, container = NULL, ..., toolkit = guiToolkit()) .glabel(toolkit, text, markup = FALSE, editable = FALSE, handler = NULL, action = NULL, container = NULL, ...) ## S3 replacement method for class 'GLabel' svalue(obj, index=TRUE, ...) <- value
text |
character. Collapsed using a newline to a single string. |
markup |
logical. If toolkit supports markup, this indicates
it will be used. It is suggested that the |
editable |
If TRUE, then clicking on label will enable user-editing of the text. |
handler |
optional handler. If given, added through addHandlerChanged. Overridden if |
action |
passed to handler through |
container |
parent container (Optional for some toolkits, but not all). |
... |
passed to |
toolkit |
toolkit instance |
obj |
object of method call |
index |
NULL or logical. If |
value |
value to assign for selection or property |
a GLabel
instance. While this object has its own (reference) methods, one primarily interacts with it through S3 methods defined within the package.
john verzani
## Not run: w <- gwindow("gformlayout", visible=FALSE) g <- gvbox(container=w) g$set_borderwidth(10) l1 <- glabel("static label", container=g) l2 <- glabel("bold label", container=g) font(l2) <- list(weight="bold") l3 <- glabel("editable label. Click me", editable=TRUE, container=g) visible(w) <- TRUE ## End(Not run)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.