# Re: load\_panel\_subclass help

**URL:** <https://www.ruby-forum.com/t/re-load-panel-subclass-help/148823>\
**Category:** wxRuby\
**Created:** [September 17, 2008, 12:57pm UTC](https://www.ruby-forum.com/t/re-load-panel-subclass-help/148823 "2008-09-17T12:57:00Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![absolute-beginner](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/a5b964/32.png) [@absolute-beginner](https://www.ruby-forum.com/u/absolute-beginner)\
**Post date:** [September 17, 2008, 12:57pm UTC](https://www.ruby-forum.com/t/re-load-panel-subclass-help/148823/1 "2008-09-17T12:57:00Z")

</div>

Fabio

> proxy  
> class: that’s the reason i used ‘load\_panel\_subclass’

Use Ruby Modules instead of Classes to encapsulate the behaviour of  
the inner windows, such as your Panel. After the layout has been loaded  
from XRC, retrieve the panel, and use something like

panel.extend(MyPanelBehaviours)

To add the logic to it. If needed, you can use Module.extended to do  
initialize-  
like work in setting up the Panel.

By the way, XRCise will do this automatically for you, if you name your  
inner windows.

hth  
alex
