[pygtk] Arrow Buttons like in gtk.SpinButton

saeed saeed.gnu at gmail.com
Sun Jun 7 08:00:13 WST 2009


Hello everyone
I'm looking for an Arrow Button object like that used in
gtk.SpinButton. SpinButton is logically 3 parts: one a text field
looks like a gtk.Entry, one Up Arrow, and one Down Arrow. I want to
access such an arrows as separate objects(to use in my custom
container widgets).

Yes I can use a gtk.Arrow inside a gtk.EventBox or gtk.Button (to
handle clicking and other mouse events from user). But I do not want
this because of seeming shape. I want use arrow objects exactly
similar to those used in gtk.SpinButton. I didn't find them as
seperate gtk classes. I know anyone can hack in the GTK itself source
(in C) to sepperate that objects and compile them into Python
modules(like PyGTK project), but that's not simple! I'm looking for a
simple way if possible.

Last note that gtk.SpinButton itself is a gtk.Entry and has no childes
to access. But has logically 3 childes. And being a gtk.Entry is like
that logically ignoring the two arrows! Could be this a suggestion to
GTK or PyGTK developers to separate these 3 objects? For example there
be a new class gtk.ArrowButton (with direction types like gtk.Arrow),
and a SpinButton be a container from 3 objects from gtk.Entry,
gtk.ArrowButton (up), gtk.ArrowButton (down). It not this better?
Whats your idea?

Thank you


More information about the pygtk mailing list