This is approximately what I get:
------------------------          --   ---------------------------
!                       !        !S!  !                           !S!
!                       !        !C!  !                           !C!
!                       !        !R!  !                           !R!
!                       !        !O!  !                           !O!
!                       !        !L!  !                            !L!
!                       !        !L!  !                            !L!
!   ListBox1       !        !B!  !       ListBox2        !B!
!                       !        !A!  !                           !A!
!                       !        !R!  !                           !R!
!                       !        !1!  !                            !2!
-------------------------         --   ---------------------------

I could never get the 1st scrollbar to stick to the 1st ListBox!!


On 10/8/07, Peter Dalgaard <[EMAIL PROTECTED]> wrote:
>
> kapo coulibaly wrote:
> > The following code should give me (at least that's what I think) two
> list
> > boxes with their individual scrollbars. But instead both scrollbars
> stick to
> > the same listbox even though they work as they should (scroll individual
> > listboxes). When I remove all the widgets on top everything works
> perfectly.
> > Any help would be highly apprecciated.
> > ps: all subsequent listboxes and scrollbars work perfectly, the first
> one
> > (column 1 of main window) is the only one constantly off.
> >
> >
> Er,......
>
> I just don't see it. What exactly goes wrong for you?
>
> > library(tcltk)
> > tt<-tktoplevel()
> > mainFont<-tkfont.create(family="times",size=16)
> > lbl.MainT<-tklabel(tt,text="Basic Manipulation",font=mainFont)
> > tkgrid(lbl.MainT,sticky="nw")
> > but.Browse<-tkbutton(tt,text=" Browse ",command=browse)
> > but.Apply<-tkbutton(tt,text=" Apply ")
> > scr1 <- tkscrollbar(tt,
> > repeatinterval=5,command=function(...)tkyview(lsbDim1,...))
> > scr2 <- tkscrollbar(tt,
> > repeatinterval=5,command=function(...)tkyview(lsbDim2,...))
> >
> lsbDim1<-tklistbox(tt,height=10,selectmode="multiple",yscrollcommand=function(...)tkset(scr1,...),background="white",exportselection=FALSE)
> >
> lsbDim2<-tklistbox(tt,height=10,selectmode="multiple",yscrollcommand=function(...)tkset(scr2,...),background="white",exportselection=FALSE)
> > for (i in 1:70) {
> >     tkinsert(lsbDim1,"end",i)
> >     }
> > for (i in 1:70) {
> >     tkinsert(lsbDim2,"end",i)
> >     }
> >
> > tkgrid(lsbDim1,scr1,lsbDim2,scr2)
> > tkgrid.configure(scr1,rowspan=10,sticky="nsw")
> > tkgrid.configure(scr2,rowspan=10,sticky="nsw")
> >
>
> --
>    O__  ---- Peter Dalgaard             Ă˜ster Farimagsgade 5, Entr.B
>   c/ /'_ --- Dept. of Biostatistics     PO Box 2099, 1014 Cph. K
> (*) \(*) -- University of Copenhagen   Denmark          Ph:  (+45)
> 35327918
> ~~~~~~~~~~ - ([EMAIL PROTECTED])                  FAX: (+45)
> 35327907
>
>
>

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org 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.

Reply via email to