Search code examples
perlwxperl

Has anyone used the Wx::GridBagSizer layout manager in Wx Perl?


The very sparse wxPerl documentation that I have been able to find says it is supported and sure enough, I can create an instance of it.

my $layout = new Wx::GridBagSizer(5,5);

But I cannot make it work. Specifically, I cannot add a widget to $layout. Anyone done this?

And while I am on the subject, has anyone found any GOOD documentation for wxPerl?


Solution

  • First, checkout Wx::Demo for examples of just about every class.

    You should add widgets using its Add method.

    $sizer->Add($widget, Wx::GBPosition->new($row, $col));
    

    and maybe

    $sizer->Add($widget, [ $row, $col ]);