[R] tk mouse cursor icon widget tkwinfo tkfocus questions

From: Frank Samuelson <expiregmane1104.m.cudgle_at_neverbox.com>
Date: Sat 11 Feb 2006 - 02:14:36 EST

  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.


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 Sun Feb 12 02:08:27 2006

This archive was generated by hypermail 2.1.8 : Tue 14 Feb 2006 - 00:37:33 EST