how to keep a wxpython app "always on top"?

2.009 visualizações
Pular para a primeira mensagem não lida

DomB

não lida,
5 de ago. de 2009, 13:36:5305/08/2009
para wxPython-users
Hi All

I would like set things up so that my wxpython app can be set so that
it is never covered by other windows - I want it always on top- is
this possible?

I'm not concerned about cross platform issues as my app will only
ever run on a ms windows machine.


Dominic

C M

não lida,
5 de ago. de 2009, 13:52:5905/08/2009
para wxPytho...@googlegroups.com
On Wed, Aug 5, 2009 at 1:36 PM, DomB<dominic.b...@gmail.com> wrote:
>
> Hi All
>
> I would like set things up so that  my wxpython app can be set so that
> it is never covered by other windows - I want it always on top- is
> this possible?

Yes, you can use the style flag style=wx.STAY_ON_TOP in the
constructor of your frame.

Che

DomB

não lida,
5 de ago. de 2009, 14:29:4005/08/2009
para wxPython-users
Hi Che,

Thank you for the rapid response- is it possible to toggle between
"stay on top" and normal behavior once the frame is up?

Dominic

On Aug 5, 1:52 pm, C M <cmpyt...@gmail.com> wrote:

C M

não lida,
5 de ago. de 2009, 15:15:1305/08/2009
para wxPytho...@googlegroups.com
On Wed, Aug 5, 2009 at 2:29 PM, DomB<dominic.b...@gmail.com> wrote:
>
> Hi Che,
>
> Thank you for the rapid response- is it possible to toggle between
> "stay on top" and normal behavior once the frame is up?
>

I don't know. Good question. I suppose you could destroy and
recreate the frame with that style, but I'm sure someone will be along
to answer if you can just dynamically change the style.

Che

Mike Driscoll

não lida,
6 de ago. de 2009, 09:40:2106/08/2009
para wxPython-users


On Aug 5, 2:15 pm, C M <cmpyt...@gmail.com> wrote:
> On Wed, Aug 5, 2009 at 2:29 PM, DomB<dominic.barraclo...@gmail.com> wrote:
>
> > Hi Che,
>
> > Thank you for the rapid response- is it possible to toggle between
> > "stay on top" and normal behavior once the frame is up?
>
> I don't know.  Good question.  I suppose you could destroy and
> recreate the frame with that style, but I'm sure someone will be along
> to answer if you can just dynamically change the style.
>
> Che

I can't remember if this topic was just on the list or someone asked
something similar on IRC, but I think Robin said that it depends on
the platform. Some will allow changes and some will not. I don't think
Windows does, so destroying and recreating is the way to go on that.

- Mike

Dietmar Schwertberger

não lida,
6 de ago. de 2009, 10:23:5006/08/2009
para wxPytho...@googlegroups.com
Mike Driscoll schrieb:

> On Aug 5, 2:15 pm, C M <cmpyt...@gmail.com> wrote:
>> On Wed, Aug 5, 2009 at 2:29 PM, DomB<dominic.barraclo...@gmail.com> wrote:
>>> Thank you for the rapid response- is it possible to toggle between
>>> "stay on top" and normal behavior once the frame is up?
>> I don't know. Good question. I suppose you could destroy and
>> recreate the frame with that style, but I'm sure someone will be along
>> to answer if you can just dynamically change the style.
> I can't remember if this topic was just on the list or someone asked
> something similar on IRC, but I think Robin said that it depends on
> the platform. Some will allow changes and some will not. I don't think
> Windows does, so destroying and recreating is the way to go on that.
Just tried with a frame on windows.
Changing on the fly is possible:


import wx
# self is a frame
style = self.GetWindowStyle()
# stay on top
self.SetWindowStyle( style | wx.STAY_ON_TOP )
# normal behaviour again
self.SetWindowStyle( style )


Regards,

Dietmar


Mike Driscoll

não lida,
6 de ago. de 2009, 14:04:2406/08/2009
para wxPython-users


On Aug 6, 9:23 am, Dietmar Schwertberger <maill...@schwertberger.de>
wrote:
Cool! Next time I'll have to try it too.

Mike

DomB

não lida,
7 de ago. de 2009, 09:21:3207/08/2009
para wxPython-users
Hi All,

Thank you for the feed back much appreciated

Dominic

On Aug 6, 2:04 pm, Mike Driscoll <kyoso...@gmail.com> wrote:
> On Aug 6, 9:23 am, Dietmar Schwertberger <maill...@schwertberger.de>
> wrote:
>
>
>
> > Mike Driscoll schrieb:> On Aug 5, 2:15 pm, C M <cmpyt...@gmail.com> wrote:
> > >> On Wed, Aug 5, 2009 at 2:29 PM, DomB<dominic.barraclo...@gmail.com> wrote:
> > >>> Thank you for the rapid response- is it possible to toggle between
> > >>> "stay ontop" and normal behavior once the frame is up?
Responder a todos
Responder ao autor
Encaminhar
0 nova mensagem