[pygtk] Help with box layout

Timo timomlists at gmail.com
Tue Mar 16 01:23:35 WST 2010


On 15-03-10 15:30, Nikolaus Rath wrote:
> >| + box.pack_start(gtk.Label(''), True, True, 0)
>>> What is this for?
>>>        
>> It (and its mate further along) are there to use up the available
>> space in 'box' to make the other widgets as small as possible, and to
>> thereby cause them to be centralized.
>>      
> Uh, I think I see. So the only way to center something in a box is to
> add an "empty" element on both sides with expand=True?
>    
>

Try using a gtk.HButtonBox instead (see the reference manual for info). 
This is excatly what you need to layout buttons.

Cheers,
Timo



More information about the pygtk mailing list