Hi Andrea,
Hi All,
I am building my own custom wx.MessageDialog. I have pretty much
finished, but I noticed something odd about the behaviour of
wxStdDialogButtonSizer. In the the wxPython demo, if you try the
wx.MessageDialog example under "Common Dialogs" on Windows XP, a
simple message dialog appears on screen: this message box has the Ok
button horizontally centered on the dialog.
The generic implementation of wxMessageDialog uses
wxStdDialogButtonSizer to layout the buttons in the dialog, and I
found this comments in the source code of wxStdDialogButtonSizer:#elif defined(__WXMSW__)
// Windows// right-justify buttons
Add(0, 0, 1, wxEXPAND, 0);in the Realize method of wxStdDialogButtonSizer (sizer.cpp). The
buttons are right-aligned, which is what I see in my custom version of
wx.MessageDialog (the Ok button is shifted to the right).
So, the question is: why there is this difference between the native
version and the generic one? Or, re-phrasing, why is
wxStdDialogButtonSizer right-aligning the buttons? Am I missing
something here?
I'm pretty sure the case of just an OK button was just overlooked, since wxStdDialogButtonSizer was concerned with situations it'd be hard for the programmer to keep right on their own. I agree wxStdDialogButtonSizer should handle this case, though.
Thanks,
Kevin
···
On Apr 10, 2008, at 8:56 AM, Andrea Gavana wrote:
Thank you for your suggestions.
Andrea.
"Imagination Is The Only Weapon In The War Against Reality."
http://xoomer.alice.it/infinity77/
_______________________________________________
wxpython-users mailing list
wxpython-users@lists.wxwidgets.org
http://lists.wxwidgets.org/mailman/listinfo/wxpython-users