File: glabel.Rd

package info (click to toggle)
r-cran-gwidgets 0.0-54.2-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, forky, sid, trixie
  • size: 2,360 kB
  • sloc: sh: 13; makefile: 2
file content (73 lines) | stat: -rw-r--r-- 2,478 bytes parent folder | download
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
\name{glabel}
\alias{glabel}
\alias{svalue<-,gLabel-method}
%%\alias{rotatelabel}
\title{Constructors for label widget}
\description{
  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.
}
\usage{
glabel(text = "", markup = FALSE, editable = FALSE, handler = NULL,
action = NULL, container = NULL, ..., toolkit = guiToolkit())

}
%- maybe also 'usage' for other objects documented here.
\arguments{
  \item{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}
  \item{markup}{ Logical indicating if text for a label uses markup }
  \item{editable}{Logical. If TRUE, then the label's text can be set
  by clicking on the label and filling in the edit box. }
  \item{handler}{Handler called on a click event}
  \item{action}{ Passed to handler }
  \item{container}{Optional container to attach widget to.}
%  \item{obj}{a \code{glabel} instance}
%  \item{angle}{Angle to rotate label, in degrees}
  \item{\dots}{Passed to \code{add} method of container}
  \item{toolkit}{Which GUI toolkit to use}

}
\details{
  
	The \code{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 \code{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 \code{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
	\code{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 \code{addhandlerchanged} handler can
	be given to respond to the text after it has been chnaged.


}
% \value{}
% \references{}
% \author{}
% \note{}
% \seealso{}
\examples{
\dontrun{
   glabel("a label", container=TRUE)
   glabel("Click me to edit label", editable=TRUE, container=TRUE)
   glabel("Click me for a message", container=TRUE,
   handler=function(h,...) {cat("Hi\n")})
}
}
\keyword{ interface }% at least one, from doc/KEYWORDS