# Tkroot options

**URL:** <https://rubytalk.org/t/tkroot-options/63619>\
**Category:** ruby-talk\
**Created:** [17 September 2011 23:50 UTC](https://rubytalk.org/t/tkroot-options/63619 "2011-09-17T23:50:55Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Joe\_Collins](https://avatars.discourse-cdn.com/v4/letter/j/4af34b/32.png) [@Joe\_Collins](https://rubytalk.org/u/Joe_Collins)\
**Post date:** [17 September 2011 23:50 UTC](https://rubytalk.org/t/tkroot-options/63619/1 "2011-09-17T23:50:55Z")

</div>

What are the complete list of tkroot options (title, minsize. resizable  
etc). How do I set the background/foreground color of the root window?

Thanks in advance,

Joe

> **···**
>
> --  
> Posted via [http://www.ruby-forum.com/](http://www.ruby-forum.com/).

---

<div class="post-metadata">

**Author:** ![Andrew\_Mcelroy](https://avatars.discourse-cdn.com/v4/letter/a/9fc29f/32.png) [@Andrew\_Mcelroy](https://rubytalk.org/u/Andrew_Mcelroy)\
**Post date:** [18 September 2011 02:43 UTC](https://rubytalk.org/t/tkroot-options/63619/2 "2011-09-18T02:43:09Z")

</div>

> What are the complete list of tkroot options (title, minsize. resizable  
> etc). How do I set the background/foreground color of the root window?
> 
> Thanks in advance,

> **[Learn How to Blog and Build Websites for Profit!](https://heyblogging.com)**
>
> Ready to take your blogging skills to the next level? Learn how to build a website that generates income and sets you up for success.

consider using pry to inspect the methods available on tkroot.

Andrew McElroy  
tryruby.org

> **···**
>
> On Sat, Sep 17, 2011 at 6:50 PM, Joe Collins \<joec\_49@hotmail.com\> wrote:
> 
> > Joe
> > 
> > --  
> > Posted via [http://www.ruby-forum.com/\](http://www.ruby-forum.com/%5C).

---

<div class="post-metadata">

**Author:** ![Joe\_Collins](https://avatars.discourse-cdn.com/v4/letter/j/4af34b/32.png) [@Joe\_Collins](https://rubytalk.org/u/Joe_Collins)\
**Post date:** [18 September 2011 12:01 UTC](https://rubytalk.org/t/tkroot-options/63619/3 "2011-09-18T12:01:01Z")

</div>

I know these options....  
&nbsp;&nbsp;&nbsp;root=TkRoot.new {  
&nbsp;&nbsp;title "StocksQuote";\  
&nbsp;&nbsp;minsize(200,250);\  
&nbsp;&nbsp;maxsize(200,250);\  
&nbsp;&nbsp;geometry('200x250');\  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;resizable(0,0)}  
&nbsp;&nbsp;&nbsp;&nbsp;#root.withdraw

Are there others, namely to set the color of the root window?

Joe

> **···**
>
> --  
> Posted via [http://www.ruby-forum.com/](http://www.ruby-forum.com/).

---

<div class="post-metadata">

**Author:** ![Joe\_Collins](https://avatars.discourse-cdn.com/v4/letter/j/4af34b/32.png) [@Joe\_Collins](https://rubytalk.org/u/Joe_Collins)\
**Post date:** [18 September 2011 12:11 UTC](https://rubytalk.org/t/tkroot-options/63619/4 "2011-09-18T12:11:04Z")

</div>

Look also at roow.withdraw which is comment out here. there must be  
other options also, i.e. configure as one example

Joe

> **···**
>
> --  
> Posted via [http://www.ruby-forum.com/](http://www.ruby-forum.com/).

---

<div class="post-metadata">

**Author:** ![Hidetoshi\_NAGAI](https://avatars.discourse-cdn.com/v4/letter/h/49beb7/32.png) [@Hidetoshi\_NAGAI](https://rubytalk.org/u/Hidetoshi_NAGAI)\
**Post date:** [19 September 2011 14:38 UTC](https://rubytalk.org/t/tkroot-options/63619/5 "2011-09-19T14:38:53Z")

</div>

Message-ID: \<472b3e92822f1746f7af293d22a9af49@ruby-forum.com\>

> What are the complete list of tkroot options (title, minsize. resizable  
> etc). How do I set the background/foreground color of the root window?

See the keys of the result of "Tk.root.current\_configinfo".  
Some of the options are Tcl/Tk's wm subcommands (which is the methods  
of Tk::Wm module). There is a trick to treat such methods as options  
of toplevel widgets. If you are interested in it, please check how to  
use "\_\_methodcall\_optkeys" method on the sources of Ruby/Tk.

> **···**
>
> From: Joe Collins \<joec\_49@hotmail.com\>  
> Subject: tkroot options  
> Date: Sun, 18 Sep 2011 08:50:55 +0900  
> --  
> Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)  
> Department of Artificial Intelligence, Kyushu Institute of Technology
