Chris,
chris botos wrote:
Hi all,
My application uses 2 monitors, onto which I have placed 2 frames, one
each in a wx.Display. The platform is Solaris 10 x86. With Xinerama
as the underlying mechanism, the desktop workspace dimension is
doubled horizontally, so the second display's upper left corner is at
1/2 the total x-dimension.
The problem I have is with dialogs. By default they are appearing in
the center of the total desktop, so they appear split horizontally
between the two monitors. I would like them to appear centered over
my main frame (on the left monitor in this case). I'm about to go
through the code and brute-force set the location of each dialog where
I want it. But before I do this I was wondering if there is a way,
that I haven't found yet, for changing their behavior globally to
always center over the main frame.
I'm using wxPython 2.6.3.3, GTK+2.4, and python 2.4.4.
What about:
CenterOnParent(self, dir=BOTH)
Center with respect to the the parent window
Werner
···
Regards,
Chris Botos
---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org
Thanks, Werner. That seems the most straightforward on an individual
dialog basis. I was hoping there might be a something more global, a
setup parameter or a method on the app, for example, so that wx would
recognize the primary frame as the one to which to default its dialog
positioning algorithm.
-Chris
···
On 11/1/07, Werner F. Bruhin <werner.bruhin@free.fr> wrote:
Chris,
chris botos wrote:
> Hi all,
>
> My application uses 2 monitors, onto which I have placed 2 frames, one
> each in a wx.Display. The platform is Solaris 10 x86. With Xinerama
> as the underlying mechanism, the desktop workspace dimension is
> doubled horizontally, so the second display's upper left corner is at
> 1/2 the total x-dimension.
>
> The problem I have is with dialogs. By default they are appearing in
> the center of the total desktop, so they appear split horizontally
> between the two monitors. I would like them to appear centered over
> my main frame (on the left monitor in this case). I'm about to go
> through the code and brute-force set the location of each dialog where
> I want it. But before I do this I was wondering if there is a way,
> that I haven't found yet, for changing their behavior globally to
> always center over the main frame.
>
> I'm using wxPython 2.6.3.3, GTK+2.4, and python 2.4.4.
>
What about:
CenterOnParent(self, dir=BOTH)
Center with respect to the the parent window