Hallo! Can anyone explain to me how to add a vert. scrollbar to a listbox using tcltk please? Thanks -- Frank Gerrit Zoellner -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Frank Gerrit Zoellner <fzoellne at TechFak.Uni-Bielefeld.DE> writes:> Hallo! > > Can anyone explain to me how to add a vert. scrollbar to a listbox using tcltk please?By add, to you mean link them so that the scrollbar, well, scrolls the listbox? The following works for me (patterned after demo(tkfaq)): local({ require(tcltk) tt <- tktoplevel() tkwm.title(tt,"Data sets in package 'base'") tlb <- tklistbox(tt,yscrollcommand=function(...)tkset(tscr,...), width=40,height=10) tscr <- tkscrollbar(tt,orient="vert", command=function(...)tkyview(tlb,...)) tkpack(tscr,side="right",fill="y") tkpack(tlb,side="right",fill="both",expand=1) INDEX <- file.path (.Library, "base", "data", "00Index") for (jj in gsub ("\t.*$", "", readLines (INDEX, n=-1))) if (jj != "") tkinsert (tlb, "end", jj) }) Enjoy, -tom -- mailto:tov at ece.cmu.edu (Tom Vogels) Tel: (412) 268-6638 FAX: -3204 -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Frank Gerrit Zoellner <fzoellne at TechFak.Uni-Bielefeld.DE> writes:> Hallo! > > Can anyone explain to me how to add a vert. scrollbar to a listbox using tcltk please?Haven't tried, but I'd expect it to work exactly as when you add a scrollbar to a text window. See the code for the tkfaq demo, or tkpager. -- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._