[PythonCE] grid manager

Bandung bandung at skyesystems.com
Tue Dec 12 16:38:30 CET 2006


Here is another thread that talks about the joys of getting the grid manager
to play nice.

http://mail.python.org/pipermail/python-list/2002-July/155857.html Using The
Grid Manager 




Bandung wrote:
> 
> The following code snippet shows what I use in order to place a frame at
> the top rather than the centre of my screen.
> 
>         #### --Frame ---------------
>         self.frame1=Frame(Parent)
>         # self.frame1.configure(width= 235,height= 150)
>         self.frame1.grid(row=0,column=0, sticky=W)
>         # self.frame1.place(x=0)
>         # self.frame1.configure(bg="green")   
>                 
>         self.frame3=Frame(Parent)
>         # self.frame3.configure(width= 235, )
>         self.frame3.grid(row=1,column=0, sticky=W) 
> 
>         self.frame4=Frame(Parent)
>         # self.frame3.configure(width= 235, )
>         self.frame4.grid(row=2,column=0, sticky=W) 
> 
> You will note that frame1 has been positioned using the grid. I set its
> position at row = 0, col = 0.  And by using the parameter "sticky = W", it
> has been left justified.  I could have used sticky= NW but instead, I
> chose to use the another command to force the frame to always be in the
> top left corner.  That is the "place" command.  
> 
>          frame.place(x=0) 
> 
> forces everything into the top left hand corner.
> 
> Hope this helps.
> 
> 
> 
> dave_welch wrote:
>> 
>> When using the grid manager is there any way to set the start of the  
>> grid. For example, I have my window default to the screen size when  
>> it starts running, but when I first use the grid manager (row=0,  
>> column=0) it places the widget at the center of the window. Is there  
>> any way to make row/column (0,0) to start from the top of the window  
>> rather than the center? Thanks.
>> _______________________________________________
>> PythonCE mailing list
>> PythonCE at python.org
>> http://mail.python.org/mailman/listinfo/pythonce
>> 
>> 
> 
> 

-- 
View this message in context: http://www.nabble.com/grid-manager-tf2715939.html#a7835420
Sent from the Python - pythonce mailing list archive at Nabble.com.



More information about the PythonCE mailing list