Hi,
 
here is the Code. It runs under wxPerl 0.21.
 
sub AddPage {
 my ($this,$szPageType,$szLabel,$hObject,$fSelectPage) = @_;
 my $id = $this->{hImageLists}->{FileTypes}->Add($hObject->GetPicture());
 my $newPanel = $szPageType->new($this->{tabRightPane},$this);
 $this->{tabRightPane}->AddPage($newPanel,$szLabel,$fSelectPage,$id);
 $hObject->SetPage($newPanel);
 $newPanel->SetObject($hObject);
 $this->{tabRightPane}->Refresh();
}
 
sub RemovePage {
 my ($this,$hObject) = @_;
 my $wPages = $this->{tabRightPane}->GetPageCount();
 for(my $i=0;$i<$wPages;$i++) {
  my $hPage = $wndIDE->{tabRightPane}->GetPage($i);
  return unless ( $hObject->can("GetPage") );
  if($hPage eq $hObject->GetPage()) {
   $this->{tabRightPane}->RemovePage($i);
   #$this->{tabRightPane}->DeletePage($i);
   $this->{tabRightPane}->SetSelection(--$i) unless($i);
   last;
  }
 }
}
 
I currently use RemovePage instead, but the notebook didnt work correctly after this. I think DeletePage would work better.
 
Thanks for the help,
 
Andre