File: ex-gtext.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 (18 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
w <- gwindow("gtext example", visible=FALSE)

## constrouctor -- font.attr sets for buffer
widget <- gtext("test text", cont = w, font.attr=list(size=24L, color="blue"))
insert(widget, "new text", font.attr=c(family="monospace"))

                
# svalue
print(svalue(widget))

# svalue<-
svalue(widget) <- "new label"

# font<-
# sets for buffer if no selection
#font(widget) <- list(family="monospace", "weight"="bold", "color"="red", size="xx-large")

visible(w) <- TRUE