Displaying 2 results from an estimated 2 matches for "returnvaloncancel".
2008 Jul 18
0
Retrieving data from a tcl /tk function
...ello,
I am sorry if this is an answered question, but I did my homework for a long while and couldn't figure out a way to retrieve data entry from a model dialog. In one of the examples compiled by James Wettenhall:
odalDialog <- function(title, question, entryInit, entryWidth = 20,
returnValOnCancel = "ID_CANCEL") {
dlg <- tktoplevel()
tkwm.deiconify(dlg)
tkgrab.set(dlg)
tkfocus(dlg)
tkwm.title(dlg, title)
textEntryVarTcl <- tclVar(paste(entryInit))
textEntryWidget <- tkentry(dlg, width = paste(entryWidth),
textvariable = textEntryVarTcl)...
2009 Apr 14
0
disappearing dialog boxes when using tcltk
...es it is not.
So I don't know the problem.)
Millions of thanks!
Hua
##===============================================
## Add Dialog Box (with only "OK" button)
##===============================================
modalDialogOK <-
function(title,question,entryInit,entryWidth=10)
{
returnValOnCancel="ID_CANCEL"
dlg <- tktoplevel()
tkwm.deiconify(dlg)
tkgrab.set(dlg)
tkfocus(dlg)
tkwm.title(dlg,title)
textEntryVarTcl <- tclVar(paste(entryInit))
textEntryWidget <-
tkentry(dlg,width=paste(entryWidth),textvariable=textEntryVarTcl)
tkgrid(tklabel(dlg,text="...