[R] tklistbox selection

Sundar Dorai-Raj sundar.dorai-raj at pdf.com
Thu Oct 30 01:56:49 CET 2008


Hi,

I'm posting yet another question about tcltk since I'm still struggling 
with the package. I'm trying to create a tklistbox and a ttkcombobox on 
the same parent and am having a problem. Here's an example:

library(tcltk)
tt <- tktoplevel()
tcl1 <- tclVar()
tcl2 <- tclVar()
tclObj(tcl1) <- letters[1:5]
tclObj(tcl2) <- LETTERS[1]
tb1 <- tklistbox(tt, listvariable = tcl1,
                  selectmode = "multiple")
tb2 <- ttkcombobox(tt, values = LETTERS[1:2],
                    textvariable = tcl2)
tkpack(tb1, tb2)

First, I select some values in the list box. But when I select a value 
from the combo box, the selection from the list box is no longer 
highlighted. Is this a bug or am I missing something in the 
documentation? My goal is to allow highlighted text simultaneously in 
both widgets.

Thanks,

--sundar



More information about the R-help mailing list