# Layers

**URL:** <https://www.ruby-forum.com/t/layers/200498>\
**Category:** wxRuby\
**Created:** [December 13, 2010, 8:30pm UTC](https://www.ruby-forum.com/t/layers/200498 "2010-12-13T20:30:56Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dobai-Pataky\_BSSSSl](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/77aa72/32.png) [@Dobai-Pataky\_BSSSSl](https://www.ruby-forum.com/u/Dobai-Pataky_BSSSSl)\
**Post date:** [December 13, 2010, 8:30pm UTC](https://www.ruby-forum.com/t/layers/200498/1 "2010-12-13T20:30:56Z")

</div>

Is there a way to stack windows in Z dimension? I find that quite useful  
in  
Android, and it would be useful here. I don’t see it in the docs or the  
C++  
book, so perhaps it’s a wish list item.

For example, I have a gauge to display with a moving dial pointer. Due  
to  
the fact that the pointer crosses several colors, simply “un-writing”  
the  
pointer before moving it will not work, so I need to redraw the  
underlying  
gauge which often hiccups even on my 4-core Ubuntu system.

If sizers could stack in Z, the top pane would be transparent except for  
the  
dial pointer and it would be the only thing redrawn.

---

<div class="post-metadata">

**Author:** ![walkins](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/96bed5/32.png) [@walkins](https://www.ruby-forum.com/u/walkins)\
**Post date:** [December 18, 2010, 7:50pm UTC](https://www.ruby-forum.com/t/layers/200498/2 "2010-12-18T19:50:58Z")

</div>

On Sat, Dec 18, 2010 at 3:07 AM, Chauk-Mean P.  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)wrote:

> Hi, Chauk-Mean -  
> I suspect that that refers to the window / frame relative to the window  
> manager hierarchy, the OS. What I want to do is to stack panels inside  
> a  
> sizer such that they overlap. I haven’t seen anything on that.

---

<div class="post-metadata">

**Author:** ![walkins](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/96bed5/32.png) [@walkins](https://www.ruby-forum.com/u/walkins)\
**Post date:** [December 18, 2010, 1:11pm UTC](https://www.ruby-forum.com/t/layers/200498/3 "2010-12-18T13:11:32Z")

</div>

Hi,

2010/12/13 Don W. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):

> Is there a way to stack windows in Z dimension?

I haven’t used them yet , but there are two methods that control the  
z-hierarchy of a window.  
Window#bring\_to\_front and Window#send\_to\_back.

Cheers,  
Chauk-Mean.

---

<div class="post-metadata">

**Author:** ![walkins](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/96bed5/32.png) [@walkins](https://www.ruby-forum.com/u/walkins)\
**Post date:** [December 20, 2010, 6:32pm UTC](https://www.ruby-forum.com/t/layers/200498/4 "2010-12-20T18:32:54Z")

</div>

On Sun, Dec 19, 2010 at 2:00 PM, Chauk-Mean P.  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)wrote:

> > manager hierarchy, the OS. What I want to do is to stack panels inside  
> > [wxTrac has been migrated to GitHub Issues - wxWidgets](http://trac.wxwidgets.org/ticket/4717)).  
> > According to the ticket, overlapping windows/controls are not advised.  
> > Unfortunately the wxWidgets documentation has not been updated  
> > accordingly ([http://docs.wxwidgets.org/stable/wx\_wxwindow.html#wxwindow](http://docs.wxwidgets.org/stable/wx_wxwindow.html#wxwindow)).  
> > Regarding wxRuby, I’ll fix the documentation to clarify this point.

Yes, it does appear to be a design decision. Very useful ‘would be  
nice’,  
though! 😃

Thanks, Chauk-Mean.

---

<div class="post-metadata">

**Author:** ![walkins](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/96bed5/32.png) [@walkins](https://www.ruby-forum.com/u/walkins)\
**Post date:** [December 20, 2010, 4:06pm UTC](https://www.ruby-forum.com/t/layers/200498/5 "2010-12-20T16:06:51Z")

</div>

Hi Don,

2010/12/18 Don W. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):

> – Don W.  
> It seems that you’re right.  
> Window#bring\_to\_front and Window#send\_to\_back correspond respectively  
> to wxWidgets Window#raise and Window#lower. The methods have been  
> renamed for consistency and to avoid name conflict with Kernel#raise.  
> And raise and lower work only for top level windows (see  
> [wxTrac has been migrated to GitHub Issues - wxWidgets](http://trac.wxwidgets.org/ticket/4717)).  
> According to the ticket, overlapping windows/controls are not advised.  
> Unfortunately the wxWidgets documentation has not been updated  
> accordingly  
> ([http://docs.wxwidgets.org/stable/wx\_wxwindow.html#wxwindow](http://docs.wxwidgets.org/stable/wx_wxwindow.html#wxwindow)).  
> Regarding wxRuby, I’ll fix the documentation to clarify this point.

Cheers,  
Chauk-Mean.
