problem with wx.FRAME_FLOAT_ON_PARENT?

Howdy,

Either I don't understand wx.FRAME_FLOAT_ON_PARENT or else it isn't working.
My understanding is that when wx.FRAME_FLOAT_ON_PARENT is included in the style, the child frame
is constrained to lie on the parent frame. In other words, you can never move the child off the parent.

In my own code, this isn't happening. Even after specifying the style, I can move the child anywhere on the
screen I want.

I did a search through the demos and wx.FRAME_FLOAT_ON_PARENT is specified only in one example:
ButtonPanel.py

When I run this demo, I still don't get the desired effect. Try running the demo and clicking on Edit->Settings Panel.
The Settings Panel can be moved anywhere including off the parent.

Am I missing something?

I'm on Win2K. wxPython 2.7.2, Python 2.5...

thanks,
Danny

Hi Danny,

My understanding is that when wx.FRAME_FLOAT_ON_PARENT is included in > the style, the child frame
is constrained to lie on the parent frame. In other words, you can never
move the child off the parent.

No, quoting the manual:

"
The frame will always be on top of its parent (unlike wxSTAY_ON_TOP).
A frame created with this style must have a non-NULL parent.
"

This doesn't mean that the child frame can not be moved outside the
parent frame area: this behavior can be accomplished only with
wxMDIParentFrame, if I remember correctly.
It just mean that, no matter where you click on the parent frame, the
child frame will be on top of the parent frame, partially "obscuring"
the parent frame view.

I did a search through the demos and wx.FRAME_FLOAT_ON_PARENT is specified
only in one example:
ButtonPanel.py

When I run this demo, I still don't get the desired effect. Try running the
demo and clicking on Edit->Settings Panel.
The Settings Panel can be moved anywhere including off the parent.

This is the intended behavior I had in mind. Basically it says: "I am
floating over the main frame until you, kind ButtonPanel user/tester,
will decide to select an option from me and close me so that I will
not bother you floating around :-D".

Andrea.

"Imagination Is The Only Weapon In The War Against Reality."
http://xoomer.virgilio.it/infinity77/

wx.FRAME_FLOAT_ON_PARENT means that the child will always be before
the parent in the Z order, even if it doesn't have focus. The most
common use is in things like palette windows. It's not intended to
constrain the window movement.

What you describe is generally considered poor UI design these days,
but the MDI classes may provide what you're looking for.

···

On 1/8/07, Danny Shevitz <shevitz@lanl.gov> wrote:

Howdy,

Either I don't understand wx.FRAME_FLOAT_ON_PARENT or else it isn't working.
My understanding is that when wx.FRAME_FLOAT_ON_PARENT is included in the
style, the child frame
is constrained to lie on the parent frame. In other words, you can never
move the child off the parent.

In my own code, this isn't happening. Even after specifying the style, I
can move the child anywhere on the
screen I want.

I did a search through the demos and wx.FRAME_FLOAT_ON_PARENT is specified
only in one example:
ButtonPanel.py

When I run this demo, I still don't get the desired effect. Try running the
demo and clicking on Edit->Settings Panel.
The Settings Panel can be moved anywhere including off the parent.

Am I missing something?

I'm on Win2K. wxPython 2.7.2, Python 2.5...

thanks,
Danny

Danny Shevitz wrote:

Howdy,

Either I don't understand wx.FRAME_FLOAT_ON_PARENT or else it isn't working.
My understanding is that when wx.FRAME_FLOAT_ON_PARENT is included in the style, the child frame
is constrained to lie on the parent frame. In other words, you can never move the child off the parent.

No, it means that it will always be above the parent in the z-order, but it doesn't cause it to be constrained to lie within the bounds of the parent. It can be positioned anywhere on screen, but if it's position happens to overlap that of the parent then the child will always be visible "above" the parent even if the parent is the active frame.

···

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

I can humbly accept your criticism being largely ignorant of current practices. Just curious,
why is it considered bad style?

TIA,
Danny

···

At 03:53 PM 1/8/2007 -0600, you wrote:

On 1/8/07, Danny Shevitz <shevitz@lanl.gov> wrote:

Howdy,

Either I don't understand wx.FRAME_FLOAT_ON_PARENT or else it isn't working.
My understanding is that when wx.FRAME_FLOAT_ON_PARENT is included in the
style, the child frame
is constrained to lie on the parent frame. In other words, you can never
move the child off the parent.

In my own code, this isn't happening. Even after specifying the style, I
can move the child anywhere on the
screen I want.

I did a search through the demos and wx.FRAME_FLOAT_ON_PARENT is specified
only in one example:
ButtonPanel.py

When I run this demo, I still don't get the desired effect. Try running the
demo and clicking on Edit->Settings Panel.
The Settings Panel can be moved anywhere including off the parent.

Am I missing something?

I'm on Win2K. wxPython 2.7.2, Python 2.5...

thanks,
Danny

wx.FRAME_FLOAT_ON_PARENT means that the child will always be before
the parent in the Z order, even if it doesn't have focus. The most
common use is in things like palette windows. It's not intended to
constrain the window movement.

What you describe is generally considered poor UI design these days,
but the MDI classes may provide what you're looking for.

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

It artificially limits the ability of the user to position windows on
the desktop. Back when screens were all 620x480 on 14 inch CRTs that
didn't matter so much, but with larger monitors and higher resolutions
available these days general practice is to allow the user this
flexibility.

···

On 1/8/07, Danny Shevitz <shevitz@lanl.gov> wrote:

I can humbly accept your criticism being largely ignorant of current
practices. Just curious,
why is it considered bad style?

TIA,
Danny

At 03:53 PM 1/8/2007 -0600, you wrote:
>On 1/8/07, Danny Shevitz <shevitz@lanl.gov> wrote:
>>Howdy,
>>
>>Either I don't understand wx.FRAME_FLOAT_ON_PARENT or else it isn't working.
>>My understanding is that when wx.FRAME_FLOAT_ON_PARENT is included in the
>>style, the child frame
>>is constrained to lie on the parent frame. In other words, you can never
>>move the child off the parent.
>>
>>In my own code, this isn't happening. Even after specifying the style, I
>>can move the child anywhere on the
>>screen I want.
>>
>>I did a search through the demos and wx.FRAME_FLOAT_ON_PARENT is specified
>>only in one example:
>>ButtonPanel.py
>>
>>When I run this demo, I still don't get the desired effect. Try running the
>>demo and clicking on Edit->Settings Panel.
>>The Settings Panel can be moved anywhere including off the parent.
>>
>>Am I missing something?
>>
>>I'm on Win2K. wxPython 2.7.2, Python 2.5...
>>
>>thanks,
>>Danny
>>
>
>wx.FRAME_FLOAT_ON_PARENT means that the child will always be before
>the parent in the Z order, even if it doesn't have focus. The most
>common use is in things like palette windows. It's not intended to
>constrain the window movement.
>
>What you describe is generally considered poor UI design these days,
>but the MDI classes may provide what you're looking for.
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
>For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org

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