ChallengeSizers (Capable)

maintainer: LionKimbro (jabber id: LionKimbro@jabber.org)

Abstract: Create a big mess of buttons on sizers.

Motivation: Sizers are ubiquitous to wxPython layout, especially development tools such as wxGlade and wxDesigner.

Resources:

Limitations:

Challenge

Create a frame with a notebook inside.

All buttons respond to a click by telling its size in a dialog (wxMessageBox).

Page 1

Has:

page1.png

1st Row:

2nd Row:

3rd Row:

4th Row:

Remember:

Page 2 Framing

This page features a single wxGridSizer.

page2-2.png

Grid sizers perform only very simple layout. Their limitations can be made up for with nested sizers.

Make a 3x3 grid sizer.

Fill with 9 buttons.

Try to make a button that fills horizontally, but not vertically, and vice versa. The layout controls for the grid sizer are not sophisticated. However, you can put a box sizer within a grid sizer cell, and get the behavior you want.

Page 3 Framing

This page features a single wxFlexGridSizer.

page3.png

Make a 3x3 flex grid sizer.

Fill with 9 buttons.

Questions to Answer

Congratulations! You're done!

Here's something to ponder:

If:

And:

WHEN?

Comments

Questions for people who attempted the challenge:

-- LionKimbro 2003-08-15 00:50:36

ChallengeSizers (last edited 2008-03-11 10:50:28 by localhost)

NOTE: To edit pages in this wiki you must be a member of the TrustedEditorsGroup.