[wxPython] layout managers

I have heard something to the effect that wxPython uses layout
managers. I looked through the docs on www.wxwindows.org, but didn't
find anything about it there. Is wxPyhthon similar to Swing in the
way it arranges widgets on the screen?

Thanks,
-D

···

_______________________________________________
wxPython-users mailing list
wxPython-users@lists.sourceforge.net
http://lists.sourceforge.net/lists/listinfo/wxpython-users

I have heard something to the effect that wxPython uses layout
managers. I looked through the docs on www.wxwindows.org, but didn't
find anything about it there. Is wxPyhthon similar to Swing in the
way it arranges widgets on the screen?

Look at the docs (and samples in the demo) for wxSizer, wxBoxSizer, wxFlexGridSizer, and other wx***Sizer classes. There is also another layout method using the wxLayoutConstraints class.

wxPython also has a simplification of constraints in the library called Layoutf.py, and the next version (coming soon) will have a port of Delphi's anchors wrapped around constraints.

Personally, I use wxBoxSizer and wxFlexGridSizer A LOT.

···

--
Robin Dunn
Software Craftsman
robin@AllDunn.com Java give you jitters?
http://wxPython.org Relax with wxPython!

_______________________________________________
wxPython-users mailing list
wxPython-users@lists.sourceforge.net
http://lists.sourceforge.net/lists/listinfo/wxpython-users

> I have heard something to the effect that wxPython uses layout
> managers. I looked through the docs on www.wxwindows.org, but didn't
> find anything about it there. Is wxPyhthon similar to Swing in the
> way it arranges widgets on the screen?
>

Look at the docs (and samples in the demo) for wxSizer, wxBoxSizer,
wxFlexGridSizer, and other wx***Sizer classes. There is also another layout

Ok, I looked at the docs for these. I saw a paragraph (in wxSizer's
doc) that said wxWindows uses a layout mechanism similar to Java AWT
and GTK. In my experiences, however, GTK and Java AWT (or Swing) have
nothing similar in the way they do layout. GTK uses Tables, VBoxes,
and HBoxes for layout which I found very easy to understand and use.
Java AWT/Swing uses various layout managers that I find are always
fighting me over where to put the widgets.

For example, in some Java work I did recently I made a dialog that had
a panel in it. The panel had 3 labels and a text entry arranged in a
table-like manner and 2 buttons in the lower right corner. On the
Windows box I did development on it looks ok (using GridBagLayout and
GridBagConstraints). When I tested it on the Solaris system, the
widgets were all crowded together in the middle and the text entry was
too small. Ugh, =p.

method using the wxLayoutConstraints class.

This would be similar to Swing's GridBagLayout + GridBagConstraints
method, right?

wxPython also has a simplification of constraints in the library called Layoutf.py, and the next version (coming soon) will have a port of Delphi's anchors wrapped around constraints.

I have never used Delphi.

Personally, I use wxBoxSizer and wxFlexGridSizer A LOT.

The wxBoxSizer looked like it was very similar to Java AWT/Swing's
BorderLayout, and the wxFlexGridSizer was similar to GTK's GtkTable.
Would you say that wxWindows/wxPython handles layout like GTK or like
Swing?

Does wxPython/wxWindows have a counterpart to libglade?

Thanks for the information.
-D

···

On Wed, Jan 31, 2001 at 10:40:33AM -0800, Robin Dunn wrote:

_______________________________________________
wxPython-users mailing list
wxPython-users@lists.sourceforge.net
http://lists.sourceforge.net/lists/listinfo/wxpython-users