Dear all, please excuse the somewhat special question:>From within R I create a Tk windows with a list of checkboxes, which canbekome too long for the screen. The obvious solution would be to put all checkboxes into a frame and make that scrollable. Alas, there are (for whatever reason!) no scrollable frames in Tk :-( The usual workaround is to put widgets (my checkboxes) into a textbox, which you _can_ make scrollable. In Tcl/Tk, when $t is a text widget, the code would be as follows: button $t.help -bitmap questhead -command Help $t window create end -window $t.help But what is the R equivalent? From the general naming scheme I would have guessed something like 'tktext.window', but that doesn't exist. Any trick with 'tkconfigure', perhaps? Any help is urgently appreciated ;-) (Which could also be a totally different workaround ...) Cheers Christoph -- Dipl.-Biol. Christoph Lange Saatmoorgraben 15 28879 Grasberg http://geohash.org/u1qqkmpu6hzkc [[alternative HTML version deleted]]
Milan Bouchet-Valat
2013-Jan-21 10:21 UTC
[R] R Tcl/Tk: How to put widgets in text widget?
Le lundi 21 janvier 2013 ? 10:32 +0100, Christoph Lange a ?crit :> Dear all, > > please excuse the somewhat special question: > > >From within R I create a Tk windows with a list of checkboxes, which can > bekome too long for the screen. The obvious solution would be to put all > checkboxes into a frame and make that scrollable. Alas, there are (for > whatever reason!) no scrollable frames in Tk :-( > > The usual workaround is to put widgets (my checkboxes) into a textbox, > which you _can_ make scrollable. In Tcl/Tk, when $t is a text widget, the > code would be as follows: > > > button $t.help -bitmap questhead -command Help > $t window create end -window $t.help > > But what is the R equivalent? From the general naming scheme I would have > guessed something like 'tktext.window', but that doesn't exist. Any trick > with 'tkconfigure', perhaps?(Totally uninformed guess:) tkwindow.create() maybe? At least, that's be how I would translate the code you posted above.> Any help is urgently appreciated ;-) > (Which could also be a totally different workaround ...) > > Cheers > Christoph >