[R-gui] tcltk notebook question: Accessing tabs in ttknotebooks
jverzani
jverzani at gmail.com
Tue May 5 23:54:54 CEST 2009
Ulrike Grömping <groemping <at> bht-berlin.de> writes:
>
> Dear John, dear all,
>
> while John's solution helped nicely for modifying the state of a tab, I
> am again stuck with selecting a tab. I've managed to capture the tabs
> numeric id (0-based). But using tkselect or tcl does not get me where I
> want. The code below shows a simplified version of what I tried:
>
> Rcmdr.new.FrF2() ## displays a window that contains a
> notebook (named tn) with 6 tabs
> ## and the first tab selected with one
> widget having the focus
> tcl(tn, "select", 1) ## for selecting the second tab; produces
> an error and leaves first tab selected
>
> Error message:
> Error in structure(.External("dotTclObjv", objv, PACKAGE = "tcltk"),
> class = "tclObj") :
> [tcl] invalid command name ".179.1"
>
You have the right command: tcl(tn, "select", 1)
The error suggests the tn "window" does not exist. Check it first with something
like: tkwinfo(tn, "exists") to see what is happening.
Hope that helps,
--John
> What am I doing wrong ? Again, any help is appreciated!
>
> Regards, Ulrike
>
More information about the R-SIG-GUI
mailing list