[pygtk] GUI design question / palette and horizontal panes

Facundo Batista facundobatista at gmail.com
Mon Mar 31 21:49:28 WST 2008


2008/3/31, Mark Mruss <selsine at gmail.com>:

>  "button palette" question? Basically I would like to set something up
>  like Glade, or The Gimp uses to select the corrent tool. A Small grid
>  of buttons with only icons on them. So far I've been using a toolbar
>  with gtk.RadioToolButtons. This "works" however the buttons are too
>  large (I think for possible text) and I'm thinking that there must be
>  a better way.

You just can put a gtk.Table, and "clickable images" in each cell, not buttons.

I've made this once when doing a search bar like the firefox one for a
textview, for which I wanted a close button, but actually a "button"
was way too high:

        close = gtk.Image()
        close.set_from_stock(gtk.STOCK_CLOSE, gtk.ICON_SIZE_SMALL_TOOLBAR)
        eventbox = gtk.EventBox()
        eventbox.add(close)
        eventbox.connect("button-release-event", self._close)

Regards,

-- 
.    Facundo

Blog: http://www.taniquetil.com.ar/plog/
PyAr: http://www.python.org/ar/


More information about the pygtk mailing list