Floating above two Frames

Hi guys,

I am stuck with the following problem and would be happy to get some ideas.

I want a floating tool frame which always stays above some other frames. The usual approach in wxpython would be to set the FRAME_FLOAT_ON_PARENT style flag. This does not solve the problem, because I want the panel to float above several frames and there can only be one parent.

My current approach is to recreate the tool frame whenever a frame is activated and then reparent the content from the old to to the new tool frame. This leads to flickr and ugly crashes. Is there a better way?

Thanks

Christof

STAY_ON_TOP ?

···

On Tue, 31 Jan 2012 01:48:46 -0800 (PST) Christof <christof.ecker@googlemail.com> wrote:

I want a floating tool frame which always stays above some other frames.
The usual approach in wxpython would be to set the FRAME_FLOAT_ON_PARENT style
flag. This does not solve the problem, because I want the panel to float
above _several_ frames and there can only be _one_ parent.

--
Show me a sane man and I will cure him for you.
    -- C. G. Jung

No thats not what I need. STAY_ON_TOP makes windows stay also above
windows of other applications, at least on windows. It should just
stay above the window of my application.

Thanks for the reply.
Christof

···

On 31 Jan., 21:56, "Jean-Yves F. Barbier" <12u...@gmail.com> wrote:

On Tue, 31 Jan 2012 01:48:46 -0800 (PST) > > Christof <christof.ec...@googlemail.com> wrote:
> I want a floating tool frame which always stays above some other frames.
> The usual approach in wxpython would be to set the FRAME_FLOAT_ON_PARENT style
> flag. This does not solve the problem, because I want the panel to float
> above _several_ frames and there can only be _one_ parent.

STAY_ON_TOP ?

--
Show me a sane man and I will cure him for you.
-- C. G. Jung

Maybe you should take a look at wx.aui or the pure Python variant, wx.agw.aui. There are demos in the wxPython demo for both and they both show an example where there’s a toolbar that you can pull out into a floating toolbar.

···

Mike Driscoll
www.mousevspython.com