Hi everyone, I have different listboxes in the same toplevel window. The problem is, if I select (by left clicking) one of those listbox elements, the current selection in the other listboxes is cleared! Anybody knows how I can prevent this?
Thanks, --------------------------------------------------- Rita Sousa DME - ME: Departamento de Metodologia Estatística - Métodos Estatísticos INE - DRP: Instituto Nacional de Estatística - Delegação Regional do Porto Tel.: 22 6072016 (Extensão: 4116) --------------------------------------------------- require(tcltk) #Criação da janela janela <- tktoplevel() tkwm.title(janela,"Apuramentos - Inquérito ao Emprego") #Estilo do texto estilo_texto <- tkfont.create(family="verdana",size=8,weight="bold") tkgrid(tklabel(janela,text="Trimestre:",font=estilo_texto)) cb1 <- tkcheckbutton(janela) cb1Valor <- tclVar("0") tkconfigure(cb1,variable=cb1Valor) tkgrid(tklabel(janela,text="1T"),cb1) #Listbox com os trimestres #janela <-tkframe(janela) tl<-tklistbox(janela,height=4,selectmode="multiple",background="white") tkgrid(tklabel(janela,text="Seleccione o(s) trimestre(s):")) tkgrid(tl) trim <- c("T1","T2","T3","T4") for (i in (1:4)) { tkinsert(tl,"end",trim[i]) } #tkselection.set(tl,2) #Listbox com as regiões t2<-tklistbox(janela,height=4,selectmode="multiple",background="white") tkgrid(tklabel(janela,text="Seleccione pelo menos uma das regiões:")) tkgrid(t2) reg <- c("Norte","Centro, Lisboa e Alentejo","Açores","Madeira") for (i in (1:4)) { tkinsert(t2,"end",reg[i]) } ... [[alternative HTML version deleted]]
______________________________________________ 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 and provide commented, minimal, self-contained, reproducible code.