# How to attach window as notebook page

**URL:** <https://www.ruby-forum.com/t/how-to-attach-window-as-notebook-page/202495>\
**Category:** Ruby-Gnome 2\
**Created:** [January 31, 2011, 8:55am UTC](https://www.ruby-forum.com/t/how-to-attach-window-as-notebook-page/202495 "2011-01-31T08:55:40Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![dubstep](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/cdc98d/32.png) [@dubstep](https://www.ruby-forum.com/u/dubstep)\
**Post date:** [January 31, 2011, 8:55am UTC](https://www.ruby-forum.com/t/how-to-attach-window-as-notebook-page/202495/1 "2011-01-31T08:55:40Z")

</div>

Dear all,

I am making a business application here with ruby gtk and want to use  
MDI  
After I look into tutorial on web, It seems with gtk we achieve MDI  
using  
gtk::notebook  
problem is, gtk::notebook cannot use gtk::window as a page directly  
and I already code most of my form using gtk::window

So, basically I need to attach gtk::window object as gtk::notebook page  
is there a way? or example would be better  
I already tried to reparent first child in window object to notebook  
but the result is ugly, I mean it gives me a lot of warning and the  
accelerator did not work.  
In every window, I use menu and accelerator, and I need them working

I heard about gtk::plug and gtk::socket but still don’t understand about  
it.  
sorry, was delphi developer here. Not really good at OOP

please help

Thank you

---

<div class="post-metadata">

**Author:** ![hendra\_kusuma](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/5f8ce5/32.png) [@hendra\_kusuma](https://www.ruby-forum.com/u/hendra_kusuma)\
**Post date:** [January 31, 2011, 9:32am UTC](https://www.ruby-forum.com/t/how-to-attach-window-as-notebook-page/202495/2 "2011-01-31T09:32:05Z")

</div>

Why couldn’t you attach any other container widget to the notebook?  
Why it has to be window?

m.

2011/1/31 hendra kusuma [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):

---

<div class="post-metadata">

**Author:** ![hendra\_kusuma](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/5f8ce5/32.png) [@hendra\_kusuma](https://www.ruby-forum.com/u/hendra_kusuma)\
**Post date:** [January 31, 2011, 9:39am UTC](https://www.ruby-forum.com/t/how-to-attach-window-as-notebook-page/202495/3 "2011-01-31T09:39:36Z")

</div>

Well, I already create a lot of forms as window  
and I will hate to do my work all over again by changing them into some  
other widget  
such as panel or even vbox

but if there is no other way, then I guess I would go that way

Just looking for some chance here

---

<div class="post-metadata">

**Author:** ![hendra\_kusuma](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/5f8ce5/32.png) [@hendra\_kusuma](https://www.ruby-forum.com/u/hendra_kusuma)\
**Post date:** [January 31, 2011, 10:26am UTC](https://www.ruby-forum.com/t/how-to-attach-window-as-notebook-page/202495/4 "2011-01-31T10:26:39Z")

</div>

OK. Forget I am asking  
I decide to change all those window object to frame  
so far so good  
just need to catch shortcut key and send them to active child

thanks anyway
