File: gcheckbox.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 (67 lines) | stat: -rw-r--r-- 1,981 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
\name{gcheckbox}
\alias{gcheckbox}
\alias{[<-,gCheckbox-method}
\title{

Constructor of widget to indicate whether a value is desired or not

}
\description{
	A checkbox shows a value and a box to  check indicating if the
	value is desired or not.
}
\usage{
gcheckbox(text, checked = FALSE, use.togglebutton=FALSE, handler = NULL, action = NULL,
container = NULL, ..., toolkit = guiToolkit())
}
%- maybe also 'usage' for other objects documented here.
\arguments{
  \item{text}{Text to show by box}
  \item{checked}{Logical indicating initial state of box}
  \item{use.togglebutton}{Logical indicating if a toggle button should be used (depresses when \code{TRUE}) in place of a check box}
  \item{handler}{ Called when box is toggled.}
  \item{action}{ Passed to handler}
  \item{container}{ Optional container to attach widget to.}
    \item{...}{Not documented, currently has no role.}
  \item{toolkit}{Which toolkit to use?}
}
\details{
	The value of the widget is either \code{TRUE} or \code{FALSE}.

	The \code{svalue} method returns a logical indicating
	\code{TRUE} if the box is checked.

	The \code{svalue<-} method can be used to set the value
	using a logical.

	The \code{"["} method returns the label on the box.

	The \code{"[<-"} method can be used to change the label on the
	box.

	The default handler is set by the \code{addHandlerClicked}
	method. This is called when the button is 
	toggled. If one wishes to have the handler called only when
	checked to indicate \code{TRUE}, say, one should check the state
	of the widget in the handler (e.g., \code{if(svalue(h$obj))}).
}
%%\value{}
%%\references{}
\author{John Verzani}
%%\note{}
\seealso{

Methods for gComponent objects are detailed in \code{\link{gWidgets-methods}}.

Event Handlers are detailed in \code{\link{gWidgets-handlers}}.


}
\examples{
\dontrun{
 gcheckbox("checked", container=TRUE, handler=function(h,...) {
   cat("The widget is checked?",svalue(h$obj), "\n")
})
}
}
\keyword{ interface }