[wxGTK] How to change the stacking order of widgets?

0 views
Skip to first unread message

Dean Edmonds

unread,
Sep 13, 2001, 4:27:02 AM9/13/01
to wx-u...@lists.wxwindows.org
I have a panel with a bunch of sub-panels on it. The user can grab the
sub-panels with the
mouse and them them around on the main panel. I want the currently
selected sub-panel
to be at the top of the stacking order so that it always slides OVER the
other sub-panels,
not under.

So far, I've found two ways of moving a child wxPanel to the top of its
parent's stacking
order: by reparenting it, or by hiding it and then showing it again.
However, both of
these lead to very annoying and noticeable flicker.

Is there another way of raising a sub-panel to the top of the stacking
order?

* * *

In a related note, I noticed that in the documentation for
wxWindow::Show() it says
the method will make a window visible and put it at the top of the
stacking order. However,
if you call Show() on a window which is already visible, it does
nothing. This is
probably done as an optimization, but it should still move the window to
the top
of the stacking order rather than just doing nothing. Is this a bug?

Thanx.


Vadim Zeitlin

unread,
Sep 18, 2001, 1:16:01 AM9/18/01
to wx-u...@lists.wxwindows.org
On Thu, 13 Sep 2001 08:30:00 -0700 Dean Edmonds <de...@gooroos.com> wrote:

DE> So far, I've found two ways of moving a child wxPanel to the top of its
DE> parent's stacking order: by reparenting it, or by hiding it and then
DE> showing it again. However, both of these lead to very annoying and
DE> noticeable flicker.

Unfortunately I don't know of other way. You'd have to wait for Robert's
reply or look for it yourself.

DE> In a related note, I noticed that in the documentation for
DE> wxWindow::Show() it says the method will make a window visible and put
DE> it at the top of the stacking order.

It's an error in the docs. It does it only for the frames (i.e. top level
windows) and only when it is called the first time.

Regards,
VZ


Reply all
Reply to author
Forward
0 new messages