Dear anybody dealing with TCLTK on R I'm trying, without any success, to get a simple TCLTK window to remain floating on top of the RGui and RConsol windows when the later have focus. I cannot find reference in the TCKTK documentation and fear that I'm missing something quite fundamental. My objective is to make a simple button populated menu to invoke R functions. I wish the TCLTK menu to remain on top so that I can manually invoke a sequence of functions without restarting the TCLTK menu after each invocation. Some of the R functions used have screen interactions in the form of locator() and identify() Any tips or abbreviated code snippets would be very much appreciated. I'm running R in Windows 2000 Simon Gatehouse CSIRO Division of Exploration and Mining, Newbigin Close off Julius Ave North Ryde, NSW 2113 Australia -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Simon.Gatehouse at csiro.au writes:> Dear anybody dealing with TCLTK on R > > I'm trying, without any success, to get a simple TCLTK window to remain > floating on top of the RGui and RConsol windows when the later have focus. I > cannot find reference in the TCKTK documentation and fear that I'm missing > something quite fundamental. > > My objective is to make a simple button populated menu to invoke R > functions. I wish the TCLTK menu to remain on top so that I can manually > invoke a sequence of functions without restarting the TCLTK menu after each > invocation. Some of the R functions used have screen interactions in the > form of locator() and identify() > > Any tips or abbreviated code snippets would be very much appreciated. > > I'm running R in Windows 2000This kind of thing is notoriously difficult to do on Windows. The focused application wants pretty badly to be on top. However, a toplevel Tk window generates an entry in the -whatsitsname- bar at the bottom of the screen, so it seems that it would be fairly easy to get your buttons back on top. -- O__ ---- Peter Dalgaard Blegdamsvej 3 c/ /'_ --- Dept. of Biostatistics 2200 Cph. N (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 ~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk) FAX: (+45) 35327907 -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Simon.Gatehouse at csiro.au wrote:> I'm trying, without any success, to get a simple TCLTK window to remain > floating on top of the RGui and RConsol windows when the later have focus....> I'm running R in Windows 2000I suspect that this is a windows issue rather than anything specific to Tk/Tcl in R. Under windows NT, and presumably win 2000, you can download a utility from microsoft called TweakUI which allows you to change the behaviour of windows. If you choose to have the focus following the mouse, and no raising of windows with the focus, you should get the behaviour you want. David Dr David A. J. Middleton, Stock Assessment Scientist Fisheries Department, Falkland Islands Government Stanley, Falkland Islands Tel: +500 27260 Fax +500 27265 Email: dmiddleton at fisheries.gov.fk Web: http://www.falklandislands.com/business/fisheries.htm -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Brian Ripley wrote:> Unfortunately not (I use TweakUI to have focus following the mouse: it > doesn't raise focussed windows for me). This works perfectly with > multiple R windows in --sdi mode, *except* with package tcltk.I confess I wrote my original reply without actually trying it. However I have now done some experimentation and, as far as I can tell, both standalone tk windows _and_ those from R's tcltk package work as expected. I'm also using R in sdi mode and the window with the mouse seems to get the focus as expected. Maybe I'm missing the point - I have only experimented briefly with the tkcanvas and tkdensity demos. Or possibly this is another of those things that is specific to particular windows setups? Just checked the TweakUI control panel and it doesn't have the option to auto-raise the window with the focus that I implied in my earlier reply. Must have been a residual memory from some X windows manager... David Dr David A. J. Middleton, Stock Assessment Scientist Fisheries Department, Falkland Islands Government Stanley, Falkland Islands Tel: +500 27260 Fax +500 27265 Email: dmiddleton at fisheries.gov.fk Web: http://www.falklandislands.com/business/fisheries.htm -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Brian Ripley, David Middleton, Peter Dalgaard and Jim Lemon all provided some insight to optimizing TCLTK in my application. Unfortunately, at this time, I am still unable to maintain a TCLTK window 'topmost' (ie a floating toolbar) when focus shifts or is shifted to another window. Nevertheless changing to sdi mode and using tweakUI have provided a useful workaround. Incidentally, tweakUI does raise the focussed window following the mouse for me (windows 2000)when the mouse options are set. I have not investigated the hidden parent window of TCLTK issue suggested by Peter Dalgaard but will do so and report if beneficial. The following may be useful to somebody. I completed a similar task sometime ago using VB4 with SPLUS V3 (I think). There, a call to the windows API achieved the desired floating toolbar. Using the same technique within R recently failed to achieve the float with R always grabbing the topmost position when it got focus. This indicates, perhaps, that R is a little quirky in the manner in which it handles windows in W2000. Many thanks to all for their advice. Any compliments on R and the core team would be inadequate. Simon Gatehouse -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._