Comment detail

ウィンドウの表示 (Nested Flatten)

This comment is reply for 1011 kkobayashi: R TclTkを使いました。(ウィンドウの表示). Go to thread root.

いまさらですが、お題の「画面中央に」を満たしていなかったので直しました。

1
2
3
4
5
6
7
8
9
library(tcltk)
w  <- 100
h  <- 75
tt <- tktoplevel(width=w, height=h)
g <- paste("+", c(round((as.integer(tkwinfo("screenwidth", tt)) - w)/2),
                  round((as.integer(tkwinfo("screenheight", tt)) - h)/2)),
           sep="", collapse="")
tkwm.geometry(tt, g)
tkwm.title(tt, "こんにちは、GUI!")

Index

Feed

Other

Link

Pathtraq

loading...