I suspect this is standard behavior. On my dual-monitor system (XP SP2), if I place TestTrack or Visual SourceSafe on the 2nd monitor then open a 2nd window, it appears on the 1st monitor. Admittedly, these are very old programs, but I also presume they are making standard API calls. You could force things yourself:
class SecondFrame(wx.Frame):
def __init__(self, parent):
x,y = firstFrame.GetPositionTuple()
pos2=(x+30, y+30)
wx.Frame.__init__(self, parent, pos=pos2)
···
At 08:44 AM 6/2/2008, you wrote:
Hi,
My users have been running a wxPython application I created for about 6 months. Recently I got a bug report that only affects the users with dual monitors. The issue is that the user may drag my application's main window to the secondary window and then launch one of the sub-frames, which appear on the primary monitor instead of with its parent. Is there a way to control which monitor a sub-frame or a dialog appears in?
I am using wxPython 2.8.7.1 (unicode) and Python 2.5 on Windows XP.
Thank you for any ideas. Hopefully I won't have to dig into low-level Windows calls.
Phil Mayes wrote:
<div class="moz-text-flowed" style="font-family: -moz-fixed">At 08:44 AM 6/2/2008, you wrote:
Hi,
My users have been running a wxPython application I created for about 6 months. Recently I got a bug report that only affects the users with dual monitors. The issue is that the user may drag my application's main window to the secondary window and then launch one of the sub-frames, which appear on the primary monitor instead of with its parent. Is there a way to control which monitor a sub-frame or a dialog appears in?
I am using wxPython 2.8.7.1 (unicode) and Python 2.5 on Windows XP.
Thank you for any ideas. Hopefully I won't have to dig into low-level Windows calls.
I suspect this is standard behavior. On my dual-monitor system (XP SP2), if I place TestTrack or Visual SourceSafe on the 2nd monitor then open a 2nd window, it appears on the 1st monitor. Admittedly, these are very old programs, but I also presume they are making standard API calls. You could force things yourself:
class SecondFrame(wx.Frame):
def __init__(self, parent):
x,y = firstFrame.GetPositionTuple()
pos2=(x+30, y+30)
wx.Frame.__init__(self, parent, pos=pos2)
</div>
I suspect as much too, but some users tend to be hard headed. I had thought of this idea and am currently experimenting with it. However, I'll also look at wxDisplay as Robin and Andrea have suggested. It may make it easier.
···
-------------------
Mike Driscoll
Blog: http:\\blog.pythonlibrary.org
Python Extension Building Network: http:\\www.pythonlibrary.org