Maybe somebody knows why the  $page1_panel->SetAutoLayout(1); doesn't  do
the job ??

BR

Lioz

On Wed, Oct 13, 2010 at 4:50 PM, Lioz Cohn <liozcoh...@gmail.com> wrote:

> Sorry but I got
>
> Undefined subroutine &MakeTest::Frame::CalcMin called at C:\perl
> ex\WX\wx_make_t
> est_02_13_10.pl line 113.
> Press any key to continue . . .
> On Wed, Oct 13, 2010 at 11:22 AM, Huub Peters <i...@huubpeters.com> wrote:
>
>>
>> On Oct 13, 2010, at 2:09 PM, Lioz Cohn wrote:
>>
>> >  Hi to all
>> >
>> > I have a wizard with a page + panel
>> >
>> > As can be seen from the attached picture the combo box and the check Box
>> are corrupted.
>> > Can you help me ?
>> > Best Regards.
>> > Lioz
>> >
>> >   my $page1_panel = Wx::Panel->new($page1,-1,[-1,-1],[200,100]);
>> >   my $page1_main_sizer = Wx::BoxSizer->new( wxVERTICAL );
>> >   my $page1_hor_box1 = Wx::BoxSizer->new( wxHORIZONTAL );
>> >   my $page1_hor_box2 = Wx::BoxSizer->new( wxHORIZONTAL );
>> >   my $page1_hor_box3 = Wx::BoxSizer->new( wxHORIZONTAL );
>> >   my $page1_hor_box4 = Wx::BoxSizer->new( wxHORIZONTAL );
>> >
>> >   my $file_name_label = Wx::StaticText->new( $page1_panel, -1, 'Please
>> add file name',);
>> >
>> >   my $file_name_text_ctrl = Wx::TextCtrl->new( $page1_panel, -1, '',
>> [-1, -1],  [-1, -1] ,wxTE_PROCESS_ENTER);
>> >
>> >
>> >
>> >
>> >   my $page1_panel_sizer      = Wx::BoxSizer->new( wxVERTICAL );
>> >   my $file_type_radio_box     = Wx::RadioBox->new($page1_panel,1,"File
>> Type",wxDefaultPosition,wxDefaultSize,['.c','.s','.S'],3,wxRA_SPECIFY_COLS);
>> >   my  $libaries_choices = ['aaa','bbb','ccc','ddd','eee'','fff'];
>> >   my $libararies_comboBox = Wx::ComboBox->new( $page1_panel,  -1,"choose
>> libray",wxDefaultPosition,wxDefaultSize,$libaries_choices);
>> >   my $test_ld_check_box       = Wx::CheckBox ->
>> new($page1_panel,-1,"Test_name.ld
>> file",wxDefaultPosition,wxDefaultSize,"pop");
>> >   $page1_hor_box1->Add( $file_name_label,            1, wxALL |
>> wxTE_CENTRE, 2);
>> >   $page1_hor_box1->Add($file_name_text_ctrl,        1 ,wxALL,  1);
>> >   $page1_hor_box2->Add( $file_type_radio_box,     1, wxALL, 1);
>> >   $page1_hor_box3->Add( $libararies_comboBox, 1, wxALL, 1);
>> >   $page1_hor_box4->Add( $test_ld_check_box,       1, wxALL, 1);
>> >   $page1_panel_sizer->Add($page1_hor_box1);
>> >   $page1_panel_sizer->Add($page1_hor_box2);
>> >   $page1_panel_sizer->Add($page1_hor_box3);
>> >   $page1_panel_sizer->Add($page1_hor_box4);
>> >
>> >   ############################
>> >   $page1_panel->SetSizer(  $page1_panel_sizer);
>> >   $page1_main_sizer->Add($page1_panel_sizer,1,wxEXPAND);
>> >   ###############################
>> >   $page1->SetSizer($page1_main_sizer);
>> >   $page1->SetAutoLayout(1);
>> > <pag1.jpg>
>>
>>
>> Hi,
>>
>> I don't see the actual wizard in your example code but I remember I've had
>> similar problems.
>> The combobox and checkbox are fine, it's the Panel that isn't sized
>> properly (too small, so clipping occurs)
>>
>> I dug up an old piece of code that might give you something to try:
>>
>>  $self->{wizard} = Wx::Wizard->new( $self, -1, "Wizard Foo",
>> Wx::Bitmap->new( 'images/wizard.bmp', wxBITMAP_TYPE_BMP ) );
>>
>>  # first page
>>  my $page1 = Wx::WizardPageSimple->new( $self->{wizard} );
>>  my $page1Sizer = Wx::BoxSizer->new(wxHORIZONTAL);
>>
>>  $self->{FooPanel} = FooPanel->new( $page1, -1);
>>  $page1Sizer->Add( $self->{FooPanel}, 0, wxEXPAND, 0);
>>  $page1->SetSizer($page1Sizer);
>>  $page1->SetTitle("Page1");
>>
>>  my $size = $page1Sizer->CalcMin();
>>  $self->{wizard}->SetPageSize( $size );
>>
>> Hope it helps.
>>
>> Cheers,
>> Huub Peters
>>
>>
>

Reply via email to