strange grid-layout manager behaviour

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

strange grid-layout manager behaviour

GKalman-2
I'm just "switching" from the pack-layout manager to the grid-layout manager.

I'm trying to understand why Button b3 is NOT centered like the other two buttons (b1 & b2). See my "mini-script" below.

What  am I doing wrong?

*******************************************


from Tkinter import *
#=================================================
class Example:
   
    def __init__(self, parent):
         
        self.parent = parent
        self.parent.geometry("+400+100")  

        frm1=Frame(self.parent,bg="cyan")
        frm1.columnconfigure(0,minsize=200)
        frm1.grid(row=0,column=0)

        frm3=Frame(self.parent,bg="orange")
        frm3.columnconfigure(1,minsize=200)
        frm3.grid(row=0,column=1)
       
        frm2=Frame(self.parent,bg="yellow")
        frm2.columnconfigure(0,minsize=400)
        frm2.grid(row=1,column=0,columnspan=2)

        b1=Button(frm1,text="1",bg="green")
        b1.grid(in_=frm1,row=0,column=0)
       
        b3=Button(frm3,text="3",bg="green")
        b3.grid(in_=frm3,row=0,column=0)
       
        b2=Button(frm2,text="2",bg="green")
        b2.grid(in_=frm2,row=0,column=0)
       
        self.parent.grid()
#=====================================================
def main():  
    root = Tk()
    app = Example(root)
    root.mainloop()  
#===================================================
if __name__ == '__main__':
    main()
Reply | Threaded
Open this post in threaded view
|

Re: strange grid-layout manager behaviour

GKalman-2
SORRY, SORRY!!!!

I should have been more carefully looking for my TYPOS! Issue [RESOLVED]

BTW:
Is there a way to remove a post, which was so HASTELY posted?
Once again: sorry


GKalman wrote
I'm just "switching" from the pack-layout manager to the grid-layout manager.

I'm trying to understand why Button b3 is NOT centered like the other two buttons (b1 & b2). See my "mini-script" below.

What  am I doing wrong?

*******************************************


from Tkinter import *
#=================================================
class Example:
   
    def __init__(self, parent):
         
        self.parent = parent
        self.parent.geometry("+400+100")  

        frm1=Frame(self.parent,bg="cyan")
        frm1.columnconfigure(0,minsize=200)
        frm1.grid(row=0,column=0)

        frm3=Frame(self.parent,bg="orange")
        frm3.columnconfigure(1,minsize=200)
        frm3.grid(row=0,column=1)
       
        frm2=Frame(self.parent,bg="yellow")
        frm2.columnconfigure(0,minsize=400)
        frm2.grid(row=1,column=0,columnspan=2)

        b1=Button(frm1,text="1",bg="green")
        b1.grid(in_=frm1,row=0,column=0)
       
        b3=Button(frm3,text="3",bg="green")
        b3.grid(in_=frm3,row=0,column=0)
       
        b2=Button(frm2,text="2",bg="green")
        b2.grid(in_=frm2,row=0,column=0)
       
        self.parent.grid()
#=====================================================
def main():  
    root = Tk()
    app = Example(root)
    root.mainloop()  
#===================================================
if __name__ == '__main__':
    main()
Reply | Threaded
Open this post in threaded view
|

Re: strange grid-layout manager behaviour

Cameron Laird-2
On Sun, Aug 28, 2011 at 11:00:29AM -0700, GKalman wrote:
                        .
                        .
                        .
> Is there a way to remove a post, which was so HASTELY posted?
                        .
                        .
                        .
It's difficult.  I'm probably the one who'd need
to take action, and I don't feel motivated enough
to undertake it.
_______________________________________________
Tkinter-discuss mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/tkinter-discuss