develooper Front page | perl.wxperl.users | Postings from February 2013

GridBagSizer anomality with 2.9

From:
Johan Vromans
Date:
February 8, 2013 16:01
Subject:
GridBagSizer anomality with 2.9
Message ID:
m2pq0ayevc.fsf@phoenix.squirrel.nl
Hi,

I have a gridbagsizer with a number of rows, each having a number of
cells.

  $grid = Wx::GridBagSizer->new( $gaps, $gaps );
  $grid->AddGrowableCol( $_, 1 ) for 0 .. $cols-1;
  $grid->AddGrowableRow( $_, 1 ) for 0 .. $rows-1;

Later, the cells are filled with panels with contents like this:

  $pn = ...create a new panel with contents...;
  $grid->Add( $pn,
               Wx::GBPosition->new( $row, $col ),
               Wx::GBSpan->new( $rspan, $cspan ),
               0|wxEXPAND|wxALIGN_CENTER );

Assuming each cell contains a panel with a text widget with a single
letter, this is what I get with wxWidgets 2.8.12 (CitrusPerl 5.14.1):

   +-----+-----+-----+-----+
   |  A  |  B  |  C  |  D  |
   +-----+-----+-----+-----+
   |  E  |  F  |  G  |  H  |
   +-----+-----+-----+-----+

This is the desired result.

With wxWidgets 2.9.4 (CitrusPerl 5.16.1), it looks like this:

   +-----------------+-+-+-+
   |        A        |B|C|D|
   +-----------------+-+-+-+
   |        E        |F|G|H|
   +-----------------+-+-+-+

No doubt I'm doing something wrong. Before I start digging this out,
does this look familiar to anybody?

-- Johan



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About