Greg Ewing skrev:
Thomas Mills Hinkle wrote:
1. If you need a widget that does not exist in other applications,
you need to draw it yourself and can control the look of it.
Even then, you should probably use the facilities of
the theme mechanism wherever possible to make your
widget follow the current theme somewhat. The Style
object attached to a widget has methods for drawing
lines, boxes, etc. in a way that matches the current
style.
That depends on the widget. In some cases you don't need to do any drawing.
You can create widgets which are composed by other widgets.
In kiwi[1] there are quite a few of them:
* KiwiEntry: a Entry subclass with icon and mask support
* ComboEntry:
KiwiEntry with entry completion + ToggleButton with a Arrow inside and
a popup with results
* IconEntry: A mixin which adds an icon to the left or the right on an
entry.
* HyperLink: EventBox with a label, that is clickable
* ObjectList: ScrolledWindow with a TreeView (and TreeViewColumn +
TreeModel)
* SelectableBox: HBox/VBox which has a border around one child
The only one of them which does additional drawing is IconEntry, which
resizes the
two windows in an entry, adds a new one where a pixbuf can be drawn.
Johan
_______________________________________________
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/