Centers the window in its parent. If the window does not have a parent, it is centered on the screen.
If direction is wx:const-horizontal, the window is centered horizontally. If direction is wx:const-vertical, the window is centered vertically. If direction is wx:const-both, the window is centered in both directions.