I have a wxFileDialog that I would like centered on the screen, but none of
the normal window movement or positioning methods seem to work. Instead it
is always positioned in the upper left corner of the parent. Is there anyway
to center it?
Well, I figured out a way to do it by controlling the position of a hidden
parent frame, but it seems there should be an easier way. Is there?
Thanks,
Dan
···
----- Original Message -----
From: "Dan Rolander" <dan.rolander@marriott.com>
To: <wxpython-users@lists.sourceforge.net>
Sent: Monday, January 29, 2001 7:24 AM
Subject: [wxPython] Way to center wxFileDialog?
Hi,
I have a wxFileDialog that I would like centered on the screen, but none
of
the normal window movement or positioning methods seem to work. Instead it
is always positioned in the upper left corner of the parent. Is there
I have a wxFileDialog that I would like centered on the screen,
but none of
the normal window movement or positioning methods seem to work. Instead it
is always positioned in the upper left corner of the parent. Is
there anyway
to center it?
I have a wxFileDialog that I would like centered on the screen, but none of
the normal window movement or positioning methods seem to work. Instead it
is always positioned in the upper left corner of the parent. Is there anyway
to center it?
I assume you are talking about MSW. If so then the wxFileDialog is just a thin wrapper about the Windows Common Dialog, which really means that it is wrapping the win32 APIs GetSaveFileName and GetOpenFileName. There is no real window handle that we can send the move or size messages to, the APIs are called in the ShowModal method.
···
--
Robin Dunn
Software Craftsman
robin@AllDunn.com Java give you jitters? http://wxPython.org Relax with wxPython!
----- Original Message -----
From: "Dave Brueck" <dbrueck@edgix.com>
To: <wxpython-users@lists.sourceforge.net>
Sent: Monday, January 29, 2001 11:43 AM
Subject: RE: [wxPython] Way to center wxFileDialog?
> I have a wxFileDialog that I would like centered on the screen,
> but none of
> the normal window movement or positioning methods seem to work. Instead
it
> is always positioned in the upper left corner of the parent. Is
> there anyway
> to center it?
Thanks Robin. Yeah I just checked the API calls and you're right (of
course!). I also tested some other Windows apps and that does seem to be the
normal behavior (upper left corner of parent). Oh well. Like I said before,
I've got a workaround.
Dan
···
----- Original Message -----
From: "Robin Dunn" <robin@alldunn.com>
To: <wxpython-users@lists.sourceforge.net>
Sent: Monday, January 29, 2001 12:45 PM
Subject: Re: [wxPython] Way to center wxFileDialog?
I have a wxFileDialog that I would like centered on the screen, but none
of
the normal window movement or positioning methods seem to work. Instead it
is always positioned in the upper left corner of the parent. Is there
anyway
to center it?
I assume you are talking about MSW. If so then the wxFileDialog is just a
thin wrapper about the Windows Common Dialog, which really means that it is
wrapping the win32 APIs GetSaveFileName and GetOpenFileName. There is no
real window handle that we can send the move or size messages to, the APIs
are called in the ShowModal method.
--
Robin Dunn
Software Craftsman
robin@AllDunn.com Java give you jitters? http://wxPython.org Relax with wxPython!