Andre Luis Lopes writes:
> I'm really learning PyGtk very quickly. However, there is yet some
> concepts wich I couldn't understand. Could someone try to explain me how the
> packing concept works with Gtk ?
Basically, you have widgets. Lots of widgets. Some widgets draw
themselves, being labels, or buttons, or drawing areas, or
separators. Some of these widgets can contain a single widget. Other
widgets can contain multiple widgets.
Each widget can report on how big it would like to be. If a widget
contains other widgets, it has to ask them how big they want to be,
then it adds its own size on top, and returns that. The top-level
widget expands the X window (if it can, and if it's needed), then asks
everything to render itself in the appropriate locations.
For example, the GtkVBox widget contains one or more widgets. It asks
each how big it should be, then sets its width to the largest width,
and the height to the sum of the heights. It adds a spacing
in-between each widget, and adds border around all the widgets.
I found it easiest to understand using glade. Install it, and start
placing widgets. You can fiddle with the options, and watch the
widgets re-size or re-place themselves.
--
-russ nelson will be speaking at http://www.osdn.com/conferences/brie/
Crynwr sells support for free software | PGPok | Watch out! He's got an
521 Pleasant Valley Rd. | +1 315 268 1925 voice | opinion, and he's not
Potsdam, NY 13676-3213 | +1 315 268 9201 FAX | afraid to share it!
_______________________________________________
pygtk mailing list [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk