Thanks. I've improved the code to handle Vertical & Horizontal boxes. The result is pretty flexible and rather simple to write. You're free to specify any size for any widget or let the layout find the minimum required size to handle all the stuff (if possible).
Here are two screenshots: http://www.loria.fr/~rougier/tmp/glydget-1.png http://www.loria.fr/~rougier/tmp/glydget-2.png And the code is available at: http://www.loria.fr/~rougier/tmp/glydget.tgz The big part of the algorithm lies in the box class that tries to honor child size request based on children homogeneity, expandable properties, spacers and border. The window class shows how to make a layout using a close button, a title area, a status bar, a sizer button and a content area using only vbox and hbox. Hope that helps. Nicolas On Jun 6, 9:28 am, Lynx <[email protected]> wrote: > On Jun 2, 11:46 am, Nicolas Rougier <[email protected]> wrote: > > > Ok, sorry for the spam. > > Not spam at all in my opinion, thanks for the interesting idea on > spacers! I've implemented a version of these in my GUI project, which > I'm currently rewriting. > > The N-patch code looks very well thought out as well. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "pyglet-users" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/pyglet-users?hl=en -~----------~----~----~----~------~----~------~--~---
