[wxMac] wxDialog::Center function improvement required

H H at h.com
Tue Feb 20 11:38:08 PST 2007


When calling wxDialog::Center the dialog will be centered on the screen. 
This is normally not a problem but for large vertical dialogs this is a 
problem because the main screen has on the upper part the menu bar. If 
the dialog is now vertically centered part of the upper frame part is 
hidden below the menubar although there is still space available in the 
bottom part of the screen.
I suggest a modification of wxDialog::Center in a sense that it centers 
the dialog on the screen after having subtracted the space required for 
the menubar for the main screen.
As an easy test example create a dialog with the vertical size of 
'height screen'-'height menubar'. A part of the dialog will be hidden 
below the menubar.

Hartwig






More information about the wx-users mailing list