[R] tk mouse cursor icon widget tkwinfo tkfocus questions
Frank Samuelson
expiregmane1104.m.cudgle at neverbox.com
Fri Feb 10 16:14:36 CET 2006
1. I want to change the mouse cursor over my window into a wait/watch
icon while R computes. Can this be done directly?
Some ancient tcltk mailing lists said change the cursor over every
widget in the window:
foreach widget [winfo children $window] {
$widget config -cursor watch
}
To do this I'll need a list of R/tcl widget objects:
lapply(widglist, function(z) tkconfigure(z, cursor="watch"))
From where can I get this widglist?
I tried:
> tkwinfo("children",topwindow)
<Tcl> .1.1 .1.2 .1.3
I'm guessing this is a string directly returned from tcl.
Is there a way to turn this into a list of widgets after some parsing?
Right now I'm using a hardcoded list for widglist, but if I or others
change the layout, the coding gets messy.
2. How do I specify the force option with tkfocus? Or, more generally,
any option in a tk function that doesn't take a value?
I can see the force option is available from the errors at my
failed attempts to specify it. MS keeps popping up my Tk
window behind another window.
Thanks for any help.
-Frank
More information about the R-help
mailing list