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

______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Reply via email to