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

From: wu sz <r.shengzhe_at_gmail.com>
Date: Tue 12 Jul 2005 - 20:28:09 EST


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@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Tue Jul 12 20:36:34 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:33:31 EST