- // paint custom borders
- wxNcPaintEvent eventNc( GetId() );
- eventNc.SetEventObject( this );
- GetEventHandler()->ProcessEvent( eventNc );
+ if ( child->MacGetTopBorderSize() )
+ {
+ int x,y;
+ child->GetPosition( &x, &y );
+ int w,h;
+ child->GetSize( &w, &h );
+ Rect childRect = { y , x , y + h , x + w } ;
+ OffsetRect( &childRect , MacGetLeftBorderSize() , MacGetTopBorderSize() ) ;
+ if ( RectInRgn( &childRect , updatergn ) )
+ {
+ // paint custom borders
+ wxNcPaintEvent eventNc( child->GetId() );
+ eventNc.SetEventObject( child );
+ child->GetEventHandler()->ProcessEvent( eventNc );
+ }
+ }