Trouble with nested sizers and alignment

Yes.

···

On 7/4/12 12:57 PM, Michael Markieta wrote:

Attached a crude model of what my sizers look like.

I have a panel which contains a GridSizer of 4 rows, 3 column dimensions.
Each grid has a vertical BoxSizer with 2 objects (A and B).

The BoxSizer items are aligned to the left, that is, A and B align on
their left. (GOOD).
The GridSizer items are aligned to the left, that is, all items in the
first column align to their left edge, and so on (GOOD).
The GridSizer itself, is aligned to the left of the panel, that is, the
GridSizer is aligned to the left edge of the parent panel. (BAD)

I am trying to centre my GridSizer inside its parent panel. Must I
create a new sizer and add the GridSizer to it, thereby allowing me to
align it to the centre using the flags of the Add() method.

--
Robin Dunn
Software Craftsman