[wxPython-users] 2-monitor question
Chris Mellon
arkanes at gmail.com
Thu Nov 1 07:01:57 PDT 2007
On Nov 1, 2007 8:38 AM, chris botos <chris.botos at gmail.com> wrote:
> 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
>
wx doesn't have any specific mechanism for auto-positioning, it's done
by the environment and/or the native toolkit. In this case, it's the
responsibility of the window manager to place windows in reasonable
positions.
More information about the wxpython-users
mailing list