Hi. I am trying to show data using the paned window widget, and am encountering this problem: whenever the vertical/horizontal resizing bars are moved, the widgets and data on the panels are thrown out of alignment and sometimes totally disappear. They only reappear when you sort of drag the panes across in a trial-and-error manner. Also, when i update the labels to reflect a current recordset, some of the labels disappear. Can someone please explain what I am doing wrong?
I don't know if this will help, but this is what the problematic code looks like: def showtagcloud(self): rts = Tk() rts.title("Similarly Tagged Files") rts.geometry("900x600") pane1 = PanedWindow(rts) pane1.pack(fill=BOTH, expand=1) #LEFT PANE left = Label(pane1, width=30) pane1.add(left) pane2 = PanedWindow(pane1, orient=VERTICAL) pane1.add(pane2) #TOP PANE top = Label(pane2, height=210, width=45) pane2.add(top) #BOTTOM PANE bottom = Label(pane2, height=5) pane2.add(bottom) pane1.paneconfig(left,minsize=400) pane2.paneconfig(top,minsize=450) LbForm = Label(left, text="File titles", justify=LEFT) LbForm.pack(anchor=N, padx=5, pady=20) LbDet = Label(top, text="File details", justify=LEFT) LbDet.pack(anchor=N, padx=5, pady=20) self.LbID = Label(top) self.LbID.pack(padx=10, pady=3, anchor=NW) self.LbTID = Label(top) self.LbTID.pack(padx=15, pady=5, anchor=NW) self.LbTitl = Label(top) self.LbTitl.pack(padx=10, pady=3, anchor=NW) self.LbTitle = Label(top) self.LbTitle.pack(padx=15, pady=5, anchor=NW) self.LbAu = Label(top) self.LbAu.pack(padx=10, pady=3, anchor=NW) self.LbAuth = Label(top) self.LbAuth.pack(padx=15, pady=5, anchor=NW) self.LbLoc = Label(top) self.LbLoc.pack(padx=10, pady=3, anchor=NW) self.LbPathway = Label(top) self.LbPathway.pack(padx=15, pady=5, anchor=NW) self.LbAbs = Label(top) self.LbAbs.pack(padx=10, pady=3, anchor=NW) self.LbAbst = Label(top) self.LbAbst.pack(padx=15, pady=5, anchor=NW) LbTc = Label(bottom, text="Other tags for this file:") LbTc.pack(anchor=NW, padx=5, pady=20) self.LbT1 = Label(bottom) self.LbT1.pack(padx=10, pady=5) self.LbT2 = Label(bottom) self.LbT2.pack(padx=10, pady=5) self.LbT3 = Label(bottom) self.LbT3.pack(padx=10, pady=5) self.LbT4 = Label(bottom) self.LbT4.pack(padx=10, pady=5) self.LbT5 = Label(bottom) self.LbT5.pack(padx=10, pady=5) self.LstTag = Listbox(left, selectmode=BROWSE) ScrBarV = Scrollbar(left) ScrBarH = Scrollbar(left, orient=HORIZONTAL) self.LstTag.pack(side=LEFT,fill=Y) ScrBarV.pack(side=RIGHT,fill=Y) ScrBarV.config(command=self.LstTag.yview) self.LstTag.config(width=60, yscrollcommand = ScrBarV.set) for xno in range(0, self.gsmax-1): self.LstTag.insert(END,str(self.pundoos[xno][1])) self.LstTag.bind("<<ListboxSelect>>", self.elaborate) def elaborate(self, event): temphold = self.LstTag.get(self.LstTag.curselection()[0]) for xno in range(0, self.gsmax-1): if self.pundoos[xno][1]==temphold: self.LbID.config(text="Index No.") self.LbTID.config(text=self.pundoos[xno][0]) self.LbTitl.config(text="Title") self.LbTitle.config(text=self.pundoos[xno][1], wraplength=300, justify=LEFT) self.LbAu.config(text="Author(s)") self.LbAuth.config(text=self.pundoos[xno][2], wraplength=300, justify=LEFT) self.LbLoc.config(text="Path") self.LbPathway.config(text=self.pundoos[xno][3], wraplength=300, justify=LEFT) self.LbAbs.config(text="Abstract") self.LbAbst.config(text=self.pundoos[xno][4], wraplength=300, justify=LEFT) self.LbT1.config(text=self.pundoos[xno][5],wraplength=200, justify=LEFT) self.LbT2.config(text=self.pundoos[xno][6],wraplength=200, justify=LEFT) self.LbT3.config(text=self.pundoos[xno][7],wraplength=200, justify=LEFT) self.LbT4.config(text=self.pundoos[xno][8],wraplength=200, justify=LEFT) self.LbT5.config(text=self.pundoos[xno][9],wraplength=200, justify=LEFT) Thanks. Mridula.
-- http://mail.python.org/mailman/listinfo/python-list