Re: [pygtk] Toolbar layout button to right

2008-02-20 Thread Edward Stow
On Wed, Feb 20, 2008 at 10:36 AM, Gian Mario Tagliaretti
[EMAIL PROTECTED] wrote:
 On Feb 20, 2008 12:21 AM, Edward Stow [EMAIL PROTECTED] wrote:

  Hi Edward,


   I'm having trouble packing a toolbar.
  
   I require a toolbar with 3 buttons packed to the left and one that is
   always on the right. As illustrated below.
  
   [Button1__Button2__Button3__Button4]

  You can use a gtk.SeparatorToolItem setting its expand property to True.
  http://www.pygtk.org/docs/pygtk/class-gtkseparatortoolitem.html

This almost works except when you set_visible_horizontal(False) - to
hide the vertical bar  naturally voids the expand property.

But using  a ToolItem does work:

   toolbar = gtk.Toolbar()

   sep = gtk.ToolItem()
   sep.set_expand(True)

   toolbar.insert(gtk.ToolButton(None, 'Button 1'), 0)
   toolbar.insert(sep, 1)
   toolbar.insert(gtk.ToolButton(None, 'Button 2'), 2)

-- 

Edward Stow
___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/


Re: [pygtk] Toolbar layout button to right

2008-02-20 Thread Edward Stow
Hi again,

Glade does not appear to set the expand property on toolbar items ...
can this be verified?

Using glade 3.2.0 -- setting the packing expand option to Yes appears
to have no effect - when the ToolItem is created by gladed the expand
property is False.

Note that the Glade UI shows that the item has been expanded in the UI
builder but when running the application the item is not expanded.

Or am I just missing on some other option to be set.

Thanks

On Thu, Feb 21, 2008 at 5:16 AM, Edward Stow [EMAIL PROTECTED] wrote:
 On Wed, Feb 20, 2008 at 10:36 AM, Gian Mario Tagliaretti
  [EMAIL PROTECTED] wrote:


  On Feb 20, 2008 12:21 AM, Edward Stow [EMAIL PROTECTED] wrote:
  
Hi Edward,
  
  
 I'm having trouble packing a toolbar.

 I require a toolbar with 3 buttons packed to the left and one that is
 always on the right. As illustrated below.

 [Button1__Button2__Button3__Button4]
  
You can use a gtk.SeparatorToolItem setting its expand property to True.
http://www.pygtk.org/docs/pygtk/class-gtkseparatortoolitem.html


 This almost works except when you set_visible_horizontal(False) - to
  hide the vertical bar  naturally voids the expand property.

  But using  a ToolItem does work:

toolbar = gtk.Toolbar()

sep = gtk.ToolItem()
sep.set_expand(True)

toolbar.insert(gtk.ToolButton(None, 'Button 1'), 0)
toolbar.insert(sep, 1)
toolbar.insert(gtk.ToolButton(None, 'Button 2'), 2)

  --

  Edward Stow




-- 

Edward Stow
___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/


[pygtk] Toolbar layout button to right

2008-02-19 Thread Edward Stow
Hi,

I'm having trouble packing a toolbar.

I require a toolbar with 3 buttons packed to the left and one that is
always on the right. As illustrated below.

[Button1__Button2__Button3__Button4]

Packing the three to the left is ok.  This is the default behaviour of
glade when constructing the toolbar.

My question is how to have the right button (button4) on the right hand side.

I tried adding a ToolbarItem, with a HBox  and the button in the the
last hbox container.

Running this does not work - even though glade shows the button on the
right hand side.

Any suggestions:

Thanks
-- 

Edward Stow
___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/


Re: [pygtk] Toolbar layout button to right

2008-02-19 Thread Gian Mario Tagliaretti
On Feb 20, 2008 12:21 AM, Edward Stow [EMAIL PROTECTED] wrote:

Hi Edward,

 I'm having trouble packing a toolbar.

 I require a toolbar with 3 buttons packed to the left and one that is
 always on the right. As illustrated below.

 [Button1__Button2__Button3__Button4]

You can use a gtk.SeparatorToolItem setting its expand property to True.
http://www.pygtk.org/docs/pygtk/class-gtkseparatortoolitem.html

cheers
-- 
Gian Mario Tagliaretti
___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/


Re: [pygtk] Toolbar layout button to right

2008-02-19 Thread Neil Dugan

Edward Stow wrote:

Hi,

I'm having trouble packing a toolbar.

I require a toolbar with 3 buttons packed to the left and one that is
always on the right. As illustrated below.

[Button1__Button2__Button3__Button4]

Packing the three to the left is ok.  This is the default behaviour of
glade when constructing the toolbar.

My question is how to have the right button (button4) on the right hand side.

I tried adding a ToolbarItem, with a HBox  and the button in the the
last hbox container.

Running this does not work - even though glade shows the button on the
right hand side.

Any suggestions:

Thanks


Have you tried to do a pack_start() on buttons1--3 and a pack_end() on 
button4, or with glade set the buttons pack type to start/end.



Regards Neil.
___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/