odd window behavior

i have a frame that has buttons and when pressed they call a function that creates another frame on top of the first (kinda like a popup window) and on this seccond frame is another button that calls wxFileDialog but when the wxFileDialog opens it moves the frame that called it behind the original frame and when the ok or cancel buttons are pressed on the filedialog and it closes, the frame that called it remains hidden, i want for the frame that calls the filedialog to remain on top of the first frame (the one that called it) and for the file dialog to be on top of both frames, i can send the code if it will help. any help would be appreciated

thanks
justin

justin mcguire wrote:

i have a frame that has buttons and when pressed they call a function that creates another frame on top of the first (kinda like a popup window) and on this seccond frame is another button that calls wxFileDialog but when the wxFileDialog opens it moves the frame that called it behind the original frame and when the ok or cancel buttons are pressed on the filedialog and it closes, the frame that called it remains hidden, i want for the frame that calls the filedialog to remain on top of the first frame (the one that called it) and for the file dialog to be on top of both frames, i can send the code if it will help. any help would be appreciated

Platform and version?

Is the popup frame a child of the original frame? What style bits are used? Which frame is the parent of the file dialog?

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!

this is the original frame:

class MainWindow(wx.Frame):
def init(self, parent, id, title):
wx.Frame.init(self, parent, wx.ID_ANY, title, size = (815, 635), style = wx.DEFAULT_FRAME_STYLE
& ~ (wx.RESIZE_BORDER | wx.RESIZE_BOX | wx.MAXIMIZE_BOX))

this is the popup window:

newtreeframe = wx.Frame(self, title = “New Tree”, style = wx.DEFAULT_FRAME_STYLE & ~ (wx.RESIZE_BORDER

wx.RESIZE_BOX | wx.MAXIMIZE_BOX))

this is the file dialog:

chooseimage = wx.FileDialog(self, “Choose an Image”)

so i guess the answer is that no the popup is not a child of the original frame and the filedialog is not a child of the popup (i may be completely wrong as ive not been coding in python for all that long and am still a bit fuzzy on some things.)

···

On 8/11/06, Robin Dunn robin@alldunn.com wrote:

justin mcguire wrote:

i have a frame that has buttons and when pressed they call a function
that creates another frame on top of the first (kinda like a popup
window) and on this seccond frame is another button that calls

wxFileDialog but when the wxFileDialog opens it moves the frame that
called it behind the original frame and when the ok or cancel buttons
are pressed on the filedialog and it closes, the frame that called it

remains hidden, i want for the frame that calls the filedialog to remain
on top of the first frame (the one that called it) and for the file
dialog to be on top of both frames, i can send the code if it will

help. any help would be appreciated

Platform and version?

Is the popup frame a child of the original frame? What style bits are
used? Which frame is the parent of the file dialog?

Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!


To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail:
wxPython-users-help@lists.wxwidgets.org

justin mcguire wrote:

this is the original frame:

class MainWindow(wx.Frame):
        def __init__(self, parent, id, title):
            wx.Frame.__init__(self, parent, wx.ID_ANY, title, size = (815, 635), style = wx.DEFAULT_FRAME_STYLE & ~ (wx.RESIZE_BORDER | wx.RESIZE_BOX | wx.MAXIMIZE_BOX))

this is the popup window:

newtreeframe = wx.Frame(self, title = "New Tree", style = wx.DEFAULT_FRAME_STYLE & ~ (wx.RESIZE_BORDER | wx.RESIZE_BOX | wx.MAXIMIZE_BOX))

this is the file dialog:

chooseimage = wx.FileDialog(self, "Choose an Image")

so i guess the answer is that no the popup is not a child of the original frame and the filedialog is not a child of the popup (i may be completely wrong as ive not been coding in python for all that long and am still a bit fuzzy on some things.)

So the self passed to the file dialog is the first frame? Then it is the parent of the file dialog, and one of the things that dialogs do when they are closed is attempt to activate their parent frame so the app can be in the same state as before the dialog was activated. If you want the popup to be activated when the dialog closes then make it be the parent.

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!

that did it thanks for the help

···

On 8/12/06, Robin Dunn robin@alldunn.com wrote:

justin mcguire wrote:

this is the original frame:

class MainWindow(wx.Frame):
def init(self, parent, id, title):
wx.Frame.init(self, parent, wx.ID_ANY, title, size =

(815, 635), style = wx.DEFAULT_FRAME_STYLE & ~ (wx.RESIZE_BORDER |
wx.RESIZE_BOX | wx.MAXIMIZE_BOX))

this is the popup window:

newtreeframe = wx.Frame(self, title = “New Tree”, style =

wx.DEFAULT_FRAME_STYLE & ~ (wx.RESIZE_BORDER | wx.RESIZE_BOX |
wx.MAXIMIZE_BOX))

this is the file dialog:

chooseimage = wx.FileDialog(self, “Choose an Image”)

so i guess the answer is that no the popup is not a child of the
original frame and the filedialog is not a child of the popup (i may be
completely wrong as ive not been coding in python for all that long and

am still a bit fuzzy on some things.)

So the self passed to the file dialog is the first frame? Then it is
the parent of the file dialog, and one of the things that dialogs do
when they are closed is attempt to activate their parent frame so the

app can be in the same state as before the dialog was activated. If you
want the popup to be activated when the dialog closes then make it be
the parent.


Robin Dunn
Software Craftsman

http://wxPython.org
Java give you jitters? Relax with wxPython!


To unsubscribe, e-mail:
wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org