Using SetTopWindow with XRCed frames

Hi
there,

I
have an application that generates the majority of frames within it using XRCed.
When I am a few frames deep in my code and I want to bring one of the earlier
frames (call it rovingframe) to the foreground I passed in a reference to the
app and tried using…

Appref.SetTopWindow(myrovingframe)

But nothing
happened. The code didn’t throw an exception, but neither did the required
frame did not come to the top of the application. ‘rovingframe’
has no parent by the way.

I can
get the frame to come to the top of the app if I hide it and then show it
again. But when I do this I lose positional information.

I can
get position back by using rovingrframe.getPosition() and then do a .Move(oldposition)
of the frame once it has been re-shown. The problem now is that you get a
flicker of rovingframe at its origin location just before it repositions itself
to oldposition with the .Move .

My question
is in two parts. Firstly is there any reason why the .SetTopWindow() approach
not work, and secondly, how might I get around the flicker effect of the
Hide(), show() method.

Thanks
in advance

  • David

No virus found in this outgoing message.

Checked by AVG Free Edition.

Version: 7.5.516 / Virus Database: 269.19.7 - Release Date: 18/01/2008 00:00

Thanks Robin, that worked perfectly.

···

-----Original Message-----
From: Robin Dunn [mailto:robin@alldunn.com]
Sent: 22 January 2008 01:37
To: wxPython-users@lists.wxwidgets.org
Subject: Re: [wxPython-users] Using SetTopWindow with XRCed frames

David Poundall wrote:
> Hi there,
>
>
>
> I have an application that generates the majority of frames within it
> using XRCed. When I am a few frames deep in my code and I want to bring
> one of the earlier frames (call it rovingframe) to the foreground I
> passed in a reference to the app and tried using…
>
>
>
> Appref.SetTopWindow(myrovingframe)

That's not what SetTopWindow is for. You're looking for
myrovingframe.Raise()

--
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

No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.516 / Virus Database: 269.19.7 - Release Date: 18/01/2008
00:00

No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.516 / Virus Database: 269.19.7 - Release Date: 18/01/2008 00:00