Description Usage Arguments Details Examples
This constructor produces a widget to display a line or multipline lines of text.
For some toolkits, the text can be marked up.
An option is available so that the displayed text can be edited.
1 2 |
text |
Text to show in the label or button. For buttons, if this text matches a stock icon name, an icon is shown as well |
markup |
Logical indicating if text for a label uses markup |
editable |
Logical. If TRUE, then the label's text can be set by clicking on the label and filling in the edit box. |
handler |
Handler called on a click event |
action |
Passed to handler |
container |
Optional container to attach widget to. |
... |
Passed to |
toolkit |
Which GUI toolkit to use |
The svalue()
method returns the value of the
widget. For a label, this is the text as a single string
(which may not include a "\n" for newlines if not supported by
the toolkit).
The svalue<-()
method can be used to set the value of
the widget. For labels and buttons, value with length greater
than one are pasted together collapsed with "\n".
The addhandlerclicked
method specifies a handler to be
called on click events.
Although in some toolkits, labels are meant to hold static text,
gWidgets treats label widgets like other widgets allowing the user to
bind handlers to mouse clicks. For labels, if
editable=TRUE
is specified, clicking on the text allows
one to edit the label's value overriding the click handler in
the process. However, the addhandlerchanged
handler can
be given to respond to the text after it has been chnaged.
1 2 3 4 5 6 7 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.