- or download this
package SizerExampleFrame;
...
[600, 400],
);
- or download this
my $vbox = Wx::BoxSizer->new( wxVERTICAL );
- or download this
my $pnl1 = Wx::Panel->new($self, -1);
my $pnl2 = Wx::Panel->new($self, -1);
my $pnl3 = Wx::Panel->new($self, -1);
my $pnl4 = Wx::Panel->new($self, -1);
- or download this
my $lbl1 = Wx::StaticText->new( $pnl1, # parent
-1, # id,
"Testing: 1", # label
[5,10], # position
);
- or download this
my $lbl2 = Wx::StaticText->new( $pnl2, # parent
-1, # id,
...
[5,10], # position
);
- or download this
# now we want to create a vbox for the 4th panel
# in this we will put button and other panels
my $pnl4Vbox = Wx::BoxSizer->new( wxVERTICAL );
- or download this
my $btnBox = Wx::BoxSizer->new( wxHORIZONTAL );
my $pnlBtns = Wx::Panel->new( $pnl4, #parent
...
0 # border style
);
- or download this
my $btnButton1 = Wx::Button->new( $pnlBtns, -1, 'Button 1');
EVT_BUTTON( $pnlBtns, $btnButton1, \&btnButton1Clicked );
...
my $btnButton2 = Wx::Button->new( $pnlBtns, -1, 'Button 2');
EVT_BUTTON( $pnlBtns, $btnButton2, \&btnButton2Clicked );
- or download this
$btnBox->Add( $btnButton1, 1, wxALIGN_BOTTOM, 0 );
$btnBox->Add( $btnButton2, 1, wxALIGN_BOTTOM, 0 );
- or download this
$pnlBtns->SetSizer($btnBox);
- or download this
$pnl4->SetSizer($pnl4Vbox);
- or download this
$vbox->Add( $pnl1, 1, wxEXPAND | wxALL, 3);
$vbox->Add( $pnl2, 1, wxEXPAND | wxALL, 3);
$vbox->Add( $pnl3, 1, wxEXPAND | wxALL, 3);
$vbox->Add( $pnl4, 1, wxEXPAND | wxALL, 3);
- or download this
$self->SetSizer( $vbox );
...
}
- or download this
sub btnButton1Clicked {
my( $self, $event ) = @_;
...
my( $self, $event ) = @_;
print "Button 2\n";
}
- or download this
...
1;