- // Common case of no sizer and single child taking up the entire panel
- if(GetChildren().GetCount() == 1)
+ // If there is a sizer, use it instead
+ if ( GetSizer() )
+ {
+ GetSizer()->SetDimension(position.x, position.y, size.GetWidth(), size.GetHeight());
+ }
+ else if(GetChildren().GetCount() == 1)