# GUI Combobox

**URL:** <https://www.ruby-forum.com/t/gui-combobox/119363>\
**Category:** Ruby\
**Created:** [November 6, 2007, 12:56pm UTC](https://www.ruby-forum.com/t/gui-combobox/119363 "2007-11-06T12:56:03Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![lote](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/ea666f/32.png) [@lote](https://www.ruby-forum.com/u/lote)\
**Post date:** [November 6, 2007, 12:56pm UTC](https://www.ruby-forum.com/t/gui-combobox/119363/1 "2007-11-06T12:56:03Z")

</div>

Hi everbody, i am newest at the Ruby/tk and i want to do something…i  
want to use ComboBox but default tk does not contain combobox control.  
How can i use it ? and What is the difference between TCL and TK ??

thanks…

---

<div class="post-metadata">

**Author:** ![lote](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/ea666f/32.png) [@lote](https://www.ruby-forum.com/u/lote)\
**Post date:** [November 7, 2007, 6:40am UTC](https://www.ruby-forum.com/t/gui-combobox/119363/2 "2007-11-07T06:40:41Z")

</div>

Tcl is a scripting language quite a bit different from ruby,  
tk is a GUI extension to that scripting language that has been  
picked up by other scripting languages as well to serve as their  
own GUI extension (for more on Tcl/Tk directly, see [http://www.tcl.tk](http://www.tcl.tk)).

I could answer this question in Tcl by saying that the tile widget set  
in Tk 8.5beta supports comboboxes, however I doubt that Ruby/Tk is that  
up-to-date with respect to Tk versions.

Now ComboBox spelled in that way is a BWidget widget (a ‘megawidget set’  
that is an add on to Tk). Ruby/Tk at [http://rubytk.jurijveresciaka.com/](http://rubytk.jurijveresciaka.com/)  
says you make this by doing:

Tk::BWidget::ComboBox.new(root)

I believe to use this you’ll have to get the BWidget extensions  
installed to your Tk installation. See e.g.

[http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/143351](http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/143351)

If you can tell me what operating system/distribution you are running on  
I could probably help you figure out how to do that.  
Feel free to contact me off line if you prefer, as this is probably  
wandering a bit off topic for the list (into the realm of Tcl/Tk from  
Ruby).

Ron F.

---

<div class="post-metadata">

**Author:** ![lote](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/ea666f/32.png) [@lote](https://www.ruby-forum.com/u/lote)\
**Post date:** [November 7, 2007, 10:35am UTC](https://www.ruby-forum.com/t/gui-combobox/119363/3 "2007-11-07T10:35:53Z")

</div>

From: Ron F. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
Subject: Re: GUI Combobox  
Date: Tue, 6 Nov 2007 21:12:04 +0900  
Message-ID: [fgplgb$95e$removed\_email\_address@domain.invalid](mailto:fgplgb$95e$removed_email_address@domain.invalid)

> I could answer this question in Tcl by saying that the tile widget set  
> in Tk 8.5beta supports comboboxes, however I doubt that Ruby/Tk is that  
> up-to-date with respect to Tk versions.

Current Ruby/Tk (require ‘tkextlib/tile’) can support many part of  
Tile (Ttk) widgets on Tk8.5beta. But, for complete support, some  
libraries (especially, ‘tkextlib/tile/style.rb’) need to be updated.

> Now ComboBox spelled in that way is a BWidget widget (a ‘megawidget set’

See also /ext/tk/sample/tkcombobox.rb. 😉
