File: ex-gbutton.R

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 (23 lines) | stat: -rw-r--r-- 476 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
w <- gwindow("gbutton", visible=FALSE)
g <- ggroup(horizontal = FALSE, cont = w)

b <- gbutton("button", cont = g)

# svalue
print(svalue(b))

#svalue<-
svalue(b) <- "new button text"

## addHandlerChanged (click)
addHandlerChanged(b, function(h,...) print("hi"))

# button with icon
b1 <- gbutton("quit", cont = g)

# action button
a <- gaction("action", icon = "quit", handler = function(h,...) print("action"))
gbutton(action=a, cont = g)

             
visible(w) <- TRUE