# Ruby/Tk new windows

**URL:** <https://rubytalk.org/t/ruby-tk-new-windows/883>\
**Category:** ruby-talk\
**Created:** [27 July 2002 22:24 UTC](https://rubytalk.org/t/ruby-tk-new-windows/883 "2002-07-27T22:24:03Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kurt\_Hindenburg](https://avatars.discourse-cdn.com/v4/letter/k/ac8455/32.png) [@Kurt\_Hindenburg](https://rubytalk.org/u/Kurt_Hindenburg)\
**Post date:** [27 July 2002 22:24 UTC](https://rubytalk.org/t/ruby-tk-new-windows/883/1 "2002-07-27T22:24:03Z")

</div>

Within a ruby/tk gui I would like to create another window, seperate from  
the main/root window. Can there be only one TkRoot?

I didn’t see anything in the ruby source, nor the pickaxe book, nor  
several FAQs.

Any pointers?

---

<div class="post-metadata">

**Author:** ![michael\_libby1](https://avatars.discourse-cdn.com/v4/letter/m/779978/32.png) [@michael\_libby1](https://rubytalk.org/u/michael_libby1)\
**Post date:** [28 July 2002 00:31 UTC](https://rubytalk.org/t/ruby-tk-new-windows/883/2 "2002-07-28T00:31:09Z")

</div>

right. only one root per application. new windows will be children, but  
must be of TkToplevel class.

r = TkRoot.ew  
new\_window = TkToplevel.new(r)

good docs at [http://www.tcl.tk](http://www.tcl.tk) (Tcl/Tk specific, but you’ll learn to  
translate quickly)-- also RAA has ruby-tk-examples (standard  
cross-language Tk ‘widget’ demo) that is very informative.

- -michael

* * *

> **···**
>
> On Saturday 27 July 2002 17:24, Kurt V. Hindenburg wrote:
> 
> > Within a ruby/tk gui I would like to create another window, seperate  
> > from the main/root window. Can there be only one TkRoot?
> > 
> > I didn’t see anything in the ruby source, nor the pickaxe book, nor  
> > several FAQs.
> > 
> > Any pointers?
> 
> ++++++++++++++++++++++++++++++++++++++++++  
> Michael C. Libby [x@ichimunki.com](mailto:x@ichimunki.com)  
> public key: [http://www.ichimunki.com/public\_key.txt](http://www.ichimunki.com/public_key.txt)  
> web site: [http://www.ichimunki.com](http://www.ichimunki.com)  
> ++++++++++++++++++++++++++++++++++++++++++
