On Mar 16, 2007, at 6:48 AM, Heikki Toivonen wrote:
Brian Kirsch wrote:
Sure, I was talking about the AccountPreference dialogs and the
need for
them to be centered on the parent.
Actually, on Ubuntu (default window manager etc.), this happens
automatically like you'd expect.
I changed AccountsPreferencesDialog.py like so:
def OnTestAccount(self, evt):
+ win = Util.promptUserDialog(self, -1, 'prompt',
'message','default')
+ win.ShowModal()
(the lines marked + are new lines) and when I hit the Test button I
get
a dialog centered on the accounts dialog. promptUserDialog is a custom
dialog deriving from wx.Dialog and the promptUserDialog does not call
any Center* methods.
If I change self above to None, the dialog is centered on the main
Chandler window.
So I believe that as long as you pass in the the parent, the dialog
will
automatically be centered on parent. And if you didn't have the
parent,
you would not be able to CenterOnParent() anyway. This behavior would
have to be checked on Windows and Mac.
Please do check it out then. In my testing way back when the only way
I could get the dialog to center on all 3 platforms is to use the
CenterOnScreen API.
So, I am still advocating not calling any Center* methods on any
dialogs.
--
Heikki Toivonen
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
Open Source Applications Foundation "Design" mailing list
http://lists.osafoundation.org/mailman/listinfo/design
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
Open Source Applications Foundation "Design" mailing list
http://lists.osafoundation.org/mailman/listinfo/design