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 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.
> 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.
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.