Java Mailing List Archive

http://www.r-help.com/

Home » Home (12/2007) » R Help for Statistical Computing »

[R] help: how to use tkevent.generate(...)

wu sz

2005-07-12

Replies:

Hello,

I use package "tcltk" to do some GUI programming, and want to find a
function which can do the operation "click a button", just like using
a mouse to click. If tkevent.generate can do that? I tried it as
below, but failed. Please give me a hint!

tt <- tktoplevel()
tkwm.title(tt,"Simple Dialog")

onOK <- function(){print("OK")}
onCancel <- function(){print("Cancel")}
OK.but <- tkbutton(tt, text=" OK ", command=onOK)
Cancel.but <- tkbutton(tt, text="Cancel",command=onCancel)
tkgrid(OK.but,Cancel.but)

tkevent.generate(tt, onOK)


Thank you,
Shengzhe

______________________________________________
R-help@(protected)
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
©2008 r-help.com - Jax Systems, LLC, U.S.A.