sub on_paint { my( $self, $event ) = @_; my $dc = Wx::PaintDC->new( $self ); $dc->SetBrush( Wx::Brush->new( Wx::Colour->new( 0, 192, 0 ), wxSOLID ) ); $dc->SetPen( Wx::Pen->new( Wx::Colour->new( 0, 0, 0 ), 1, wxSOLID ) ); $dc->DrawRectangle( 0, 0, $self->GetSize->x, $self->GetSize->y ); }