Hi, I'm sure I've just misunderstood something simple about images, but what have I done wrong here:
my $loc_image = Wx::Image->new(560,20); my $loc_bmp; # used to hold the bitmap. $loc_bmp=Wx::Bitmap->new( $loc_image ); my $dc = Wx::PaintDC->new($self->{$loc_bmp}); $dc->DrawRectangle(0, 0, 20, 20); if( $loc_bmp->Ok() ) { # create a static bitmap called Ctl_Post_Exam_Videos_ImageViewer_Bmp that displays the # selected image. $self->{Ctl_Post_Exam_Videos_ImageViewer_Bmp}= Wx::StaticBitmap->new($self->{Ctl_Post_Exam_Videos_Pane_1}, -1, $loc_bmp); } $self->{Ctl_Post_Exam_Videos_Sizer_2}->Add($self->{Ctl_Post_Exam_Videos_Imag eViewer_Bmp}, 0, 0, 0); I expected to get a black rectangle 560 x 20 (from my $loc_image = Wx::Image->new(560,20);) with the first 20px cut off (from $dc->DrawRectangle(0, 0, 20, 20);). I get the first but not the second. Using ClientDC instead of PaintDC doesn't work either. Regards Steve
<<Blank Bkgrd.gif>>