Hi there,
 
I am having a problem with refreshes - it seems that when my button event subroutine sets a static text foreground color, the new color does not immediately show.  I have to bring something to the foreground (such as the console) or minimize and maximixe the app to get the static text to show the correct color.  I tried to do 
$this->Refresh() but that had no effect.  Below is an example of the problem, derived from the minimal.pl sample.  Press the button and the static text should turn red, which it won't until you force a repaint by minimizing and maximizing the app.
 
This seems to be new behavior - I did not see it under wxPerl 0.12, but I have seen it now under 0.13 and 0.14.  Any insight into the problem is greatly appreciated!
 
I am running Windows 2000
wxPerl 0.14
wxWindows 2.4.1
 
-Erich-
=============================================
 
#!/usr/bin/perl
use Wx;
package MyApp;
 
use strict;
use vars qw(@ISA);
 
@ISA=qw(Wx::App);
 

sub OnInit {
  my( $this ) = @_;
 
  # create new MyFrame
  my( $frame ) = MyFrame->new( "Minimal wxPerl app",
          Wx::Point->new( 50, 50 ),
          Wx::Size->new( 250, 100 )
                             );
  $this->SetTopWindow( $frame );
  $frame->Show( 1 );
 
  1;
}
 
package MyFrame;
 
use strict;
use vars qw(@ISA);
 
@ISA=qw(Wx::Frame);
 
use Wx::Event qw(EVT_BUTTON);
use Wx qw(wxRED);
 

sub new {
  my( $class ) = shift;
  my( $this ) = $class->SUPER::new( undef, -1, $_[0], $_[1], $_[2] );
 
  my ($panel) = Wx::Panel->new($this, -1, [0,100],[250,100]);
 
  $this->{LABEL} = Wx::StaticText->new($panel, -1, "Welcome to wxPerl",[5,5],[160,25]);
  my ($button) = Wx::Button->new($panel, -1, "Click Me",[15,40],[80,25]);
 
  EVT_BUTTON( $this,$button, \&OnButton );
 
  $this;
}
 

sub OnButton
{
 my ($this, $event) = @_;
 
 $this->{LABEL}->SetForegroundColour(wxRED);
}
 

package main;
 
my( $app ) = MyApp->new();
$app->MainLoop();