[wxPython-users] 2-monitor question

chris botos chris.botos at gmail.com
Thu Nov 1 06:38:01 PDT 2007


On 11/1/07, Werner F. Bruhin <werner.bruhin at 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
>

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




More information about the wxpython-users mailing list