# A good TK

**URL:** https://rubytalk.org/t/a-good-tk/19450
**Category:** ruby-talk
**Created:** [11 July 2005 01:23 UTC](https://rubytalk.org/t/a-good-tk/19450 "2005-07-11T01:23:49Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![Dibya\_Prakash1](https://avatars.discourse-cdn.com/v4/letter/d/958977/32.png) [@Dibya\_Prakash1](https://rubytalk.org/u/Dibya_Prakash1)
#### Post date: [11 July 2005 01:23 UTC](https://rubytalk.org/t/a-good-tk/19450/1 "2005-07-11T01:23:49Z")

</div>

Hi,  
I am working on a financial trading software.I need to create some  
complex UI's.Can anyone help me with some good UI tools?Any other  
suggestion is also welcome.

Thanks in advance

Regards  
Dibya Prakash

---

<div class="post-metadata">

### Author: ![Shashank\_Date4](https://avatars.discourse-cdn.com/v4/letter/s/46a35a/32.png) [@Shashank\_Date4](https://rubytalk.org/u/Shashank_Date4)
#### Post date: [11 July 2005 03:18 UTC](https://rubytalk.org/t/a-good-tk/19450/2 "2005-07-11T03:18:10Z")

</div>

Hi Dibya,

> **···**
>
> --- Dibya Prakash \<prakash.dibya@gmail.com\> wrote:
> 
> > I am working on a financial trading software.I need to create some  
> > complex UI's.Can anyone help me with some good UI tools?Any other  
> > suggestion is also welcome.
> 
> Take a look at:
> 
> [http://trug.stok.co.uk/wiki/index.php?title=Ruby\_GUI\_Toolkits#The\_Toolkits](http://trug.stok.co.uk/wiki/index.php?title=Ruby_GUI_Toolkits#The_Toolkits)
> 
> My personal favorite is wxRuby.
> 
> HTH.  
> -- shanko
> 
> \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_  
> Discover Yahoo!  
> Have fun online with music videos, cool games, IM and more. Check it out!  
> [http://discover.yahoo.com/online.html](http://discover.yahoo.com/online.html)

---

<div class="post-metadata">

### Author: ![David\_Brady](https://avatars.discourse-cdn.com/v4/letter/d/50afbb/32.png) [@David\_Brady](https://rubytalk.org/u/David_Brady)
#### Post date: [11 July 2005 04:04 UTC](https://rubytalk.org/t/a-good-tk/19450/3 "2005-07-11T04:04:37Z")

</div>

Dibya Prakash wrote:

> Hi,  
> I am working on a financial trading software.I need to create some  
> complex UI's.Can anyone help me with some good UI tools?Any other  
> suggestion is also welcome.

I dabbled with Ruby about a year ago, and got defeated by this very problem. I picked Ruby up again a month ago, and I started back down the Ruby GUI rathole this week. Here's my trail of breadcrumbs. Hope it helps! 🙂

Ruby/Tk  
- Tk is a mature, script-driven set of UI components that has bindings for most popular scripting languages. It runs on Windows, Mac and Linux. Tk defines its own set of UI widgets, so the controls look exactly the same on all three platforms. But let's be honest: Tk looks like crap. Next to a well-polished UI, Tk looks pretty klunky. Because it's script-driven, Tk slows down with very complex UIs. Ruby/Tk's biggest feature is probably that it comes with the standard Ruby install: people who use your application will only need Ruby, and won't have to install another GUI toolkit. Tk is easy to learn and is ideally suited to simple applications where the important thing is to give someone an app with a functional UI without requiring them to install the toolkit.

- Moderately well documented. If you know the tcl, perl, or python bindings to Tk you'll have no problem with Ruby/Tk. If you DON'T know those bindings, you'll have a tougher time: the Ruby/Tk approach seems to be "learn the differences between perl/Tk and Ruby/Tk and then get the perl/Tk manual."

- There's an excellent tutorial at [http://members.chello.nl/~k.vangelder/ruby/learntk/](http://members.chello.nl/~k.vangelder/ruby/learntk/)

- A good reference at [http://www.tcl.tk/man/tcl8.4/TkCmd/contents.htm\](http://www.tcl.tk/man/tcl8.4/TkCmd/contents.htm%5C).

Ruby/Gtk, Gtk+, Gtk2  
- Gtk is a linux-native Gui toolkit that produces beautiful UIs for Linux. I believe Windows and Mac ports exist, but I am not sure. The tutorial for Gtk is pretty minimal, but it gives you the feel of the toolkit and the reference manual is very thorough. The C-style bindings of Gtk2 feel better to my brain than the Tcl-style bindings of Tk, and I have had no trouble working with Gtk.

- A barebones tutorial is at [http://ruby-gnome2.sourceforge.jp/hiki.cgi?tut-gtk](http://ruby-gnome2.sourceforge.jp/hiki.cgi?tut-gtk)

- A superb reference is at [http://ruby-gnome2.sourceforge.jp/hiki.cgi?Gtk](http://ruby-gnome2.sourceforge.jp/hiki.cgi?Gtk)

wxRuby  
Ruby has bindings to the wxWindows (now wxWidgets) libraries through wxRuby. I haven't looked into wxWidgets in about a year. At the time wxRuby was a hopeless endeavor: it had the same feel as Tk, "Learn the difference between wxRuby and the C bindings to wxWidgets, and then use the wxWidgets C reference", except the C reference didn't exist: you needed to sift through the header files, and then sift through the wxRuby source to find the discrepancies. wxRuby was infuriating: it was beautiful, it was fast, it used native widgets for Linux, Windows and Mac.... but the only way to learn wxRuby was to already know wxRuby.

Now, the reason I use words like "infuriating" is because of all the cross-platform GUI toolkits, wxWidgets really does look like it's got the most potential, and it's the one I would most like to be able to use. If it was ugly or slow, I wouldn't care. 🙂 For all that I've blasted it, I will say that, if I can ever figure it out, it's the toolkit I intend to use.

I will also note that, like most of the Ruby community, they have come a LONG way in the past year. There's a wiki with pretty robust-looking documentation and some decent tutorials at:

[http://wxruby.rubyforge.org/wiki/wiki.pl](http://wxruby.rubyforge.org/wiki/wiki.pl)

There are other GUI toolkits available, but I haven't explored them. Something called "FOX" exists. There's a Qt toolkit that appears to have gotten to a usable alpha state in 2002 and then been abandoned. There may be others.

Good luck!

-dB

> **···**
>
> --  
> David Brady  
> ruby-talk@shinybit.com  
> I'm having a really surreal day... OR AM I?

---

<div class="post-metadata">

### Author: ![Dibya\_Prakash1](https://avatars.discourse-cdn.com/v4/letter/d/958977/32.png) [@Dibya\_Prakash1](https://rubytalk.org/u/Dibya_Prakash1)
#### Post date: [11 July 2005 04:17 UTC](https://rubytalk.org/t/a-good-tk/19450/4 "2005-07-11T04:17:58Z")

</div>

Hi,  
1. I have a fair idea about the Tcl binidng to Tk and also a bit of pearl.

2. I have used FOX 12 for the 1st version,however the output wasnt  
very satisfactory.

3.For the application,speed will be a concern.

4.I just checked wxRuby.........seems to be much better than FOX.

Thanks n Regards  
Dibya prakash

> **···**
>
> On 7/11/05, David Brady \<ruby\_talk@shinybit.com\> wrote:
> 
> > Dibya Prakash wrote:
> > 
> > \>Hi,  
> > \>I am working on a financial trading software.I need to create some  
> > \>complex UI's.Can anyone help me with some good UI tools?Any other  
> > \>suggestion is also welcome.  
> > \>  
> > \>  
> > I dabbled with Ruby about a year ago, and got defeated by this very  
> > problem. I picked Ruby up again a month ago, and I started back down  
> > the Ruby GUI rathole this week. Here's my trail of breadcrumbs. Hope  
> > it helps! 🙂
> > 
> > Ruby/Tk  
> > - Tk is a mature, script-driven set of UI components that has bindings  
> > for most popular scripting languages. It runs on Windows, Mac and  
> > Linux. Tk defines its own set of UI widgets, so the controls look  
> > exactly the same on all three platforms. But let's be honest: Tk looks  
> > like crap. Next to a well-polished UI, Tk looks pretty klunky. Because  
> > it's script-driven, Tk slows down with very complex UIs. Ruby/Tk's  
> > biggest feature is probably that it comes with the standard Ruby  
> > install: people who use your application will only need Ruby, and won't  
> > have to install another GUI toolkit. Tk is easy to learn and is ideally  
> > suited to simple applications where the important thing is to give  
> > someone an app with a functional UI without requiring them to install  
> > the toolkit.
> > 
> > - Moderately well documented. If you know the tcl, perl, or python  
> > bindings to Tk you'll have no problem with Ruby/Tk. If you DON'T know  
> > those bindings, you'll have a tougher time: the Ruby/Tk approach seems  
> > to be "learn the differences between perl/Tk and Ruby/Tk and then get  
> > the perl/Tk manual."
> > 
> > - There's an excellent tutorial at  
> > [http://members.chello.nl/~k.vangelder/ruby/learntk/](http://members.chello.nl/~k.vangelder/ruby/learntk/)
> > 
> > - A good reference at [http://www.tcl.tk/man/tcl8.4/TkCmd/contents.htm\](http://www.tcl.tk/man/tcl8.4/TkCmd/contents.htm%5C).
> > 
> > Ruby/Gtk, Gtk+, Gtk2  
> > - Gtk is a linux-native Gui toolkit that produces beautiful UIs for  
> > Linux. I believe Windows and Mac ports exist, but I am not sure. The  
> > tutorial for Gtk is pretty minimal, but it gives you the feel of the  
> > toolkit and the reference manual is very thorough. The C-style bindings  
> > of Gtk2 feel better to my brain than the Tcl-style bindings of Tk, and I  
> > have had no trouble working with Gtk.
> > 
> > - A barebones tutorial is at  
> > [http://ruby-gnome2.sourceforge.jp/hiki.cgi?tut-gtk](http://ruby-gnome2.sourceforge.jp/hiki.cgi?tut-gtk)
> > 
> > - A superb reference is at [http://ruby-gnome2.sourceforge.jp/hiki.cgi?Gtk](http://ruby-gnome2.sourceforge.jp/hiki.cgi?Gtk)
> > 
> > wxRuby  
> > Ruby has bindings to the wxWindows (now wxWidgets) libraries through  
> > wxRuby. I haven't looked into wxWidgets in about a year. At the time  
> > wxRuby was a hopeless endeavor: it had the same feel as Tk, "Learn the  
> > difference between wxRuby and the C bindings to wxWidgets, and then use  
> > the wxWidgets C reference", except the C reference didn't exist: you  
> > needed to sift through the header files, and then sift through the  
> > wxRuby source to find the discrepancies. wxRuby was infuriating: it was  
> > beautiful, it was fast, it used native widgets for Linux, Windows and  
> > Mac.... but the only way to learn wxRuby was to already know wxRuby.
> > 
> > Now, the reason I use words like "infuriating" is because of all the  
> > cross-platform GUI toolkits, wxWidgets really does look like it's got  
> > the most potential, and it's the one I would most like to be able to  
> > use. If it was ugly or slow, I wouldn't care. 🙂 For all that I've  
> > blasted it, I will say that, if I can ever figure it out, it's the  
> > toolkit I intend to use.
> > 
> > I will also note that, like most of the Ruby community, they have come a  
> > LONG way in the past year. There's a wiki with pretty robust-looking  
> > documentation and some decent tutorials at:
> > 
> > [http://wxruby.rubyforge.org/wiki/wiki.pl](http://wxruby.rubyforge.org/wiki/wiki.pl)
> > 
> > There are other GUI toolkits available, but I haven't explored them.  
> > Something called "FOX" exists. There's a Qt toolkit that appears to  
> > have gotten to a usable alpha state in 2002 and then been abandoned.  
> > There may be others.
> > 
> > Good luck!
> > 
> > -dB
> > 
> > --  
> > David Brady  
> > ruby-talk@shinybit.com  
> > I'm having a really surreal day... OR AM I?

---

<div class="post-metadata">

### Author: ![Richard\_Dale](https://avatars.discourse-cdn.com/v4/letter/r/6de8d8/32.png) [@Richard\_Dale](https://rubytalk.org/u/Richard_Dale)
#### Post date: [11 July 2005 06:45 UTC](https://rubytalk.org/t/a-good-tk/19450/5 "2005-07-11T06:45:50Z")

</div>

> There's a Qt toolkit that appears to  
> have gotten to a usable alpha state in 2002 and then been abandoned.  
> There may be others.

That is Ruby/Qt which is no longer maintained and only worked with Qt 1.x  
and Qt 2.x. There is a newer Qt binding called QtRuby for Qt 3.x (and a  
version for Qt 4.x is being developed). The Qt 3.x version runs on  
Linux/Unix/BSD\* and Mac OS X, and the Qt 4.x version will also run on  
Windows.

QtRuby can be used with the Qt Designer UI building tool to visually layout  
your UI, and produce a .ui file. You can either read in the xml .ui file at  
runtime directly, or there is a QtRuby tool to convert it to ruby code.

There is some description here:  
[http://developer.kde.org/language-bindings/ruby/](http://developer.kde.org/language-bindings/ruby/)

You can download the source from here:  
[http://rubyforge.org/projects/korundum/](http://rubyforge.org/projects/korundum/)

-- Richard

---

<div class="post-metadata">

### Author: ![Lothar\_Scholz2](https://avatars.discourse-cdn.com/v4/letter/l/f14d63/32.png) [@Lothar\_Scholz2](https://rubytalk.org/u/Lothar_Scholz2)
#### Post date: [11 July 2005 08:44 UTC](https://rubytalk.org/t/a-good-tk/19450/6 "2005-07-11T08:44:49Z")

</div>

Hello David,

> - Tk is a mature, script-driven set of UI components that has bindings  
> for most popular scripting languages. It runs on Windows, Mac and  
> Linux. Tk defines its own set of UI widgets, so the controls look  
> exactly the same on all three platforms. But let's be honest: Tk looks  
> like crap. Next to a well-polished UI, Tk looks pretty klunky.

Yes, but there is a new widget set that uses the plattform theming  
engine on each machine, named "Tile" . Don't know if this is already  
useable and integrated in ruby.

> - Gtk is a linux-native Gui toolkit that produces beautiful UIs for  
> Linux. I believe Windows and Mac ports exist, but I am not sure. The

No there is no working native MacOXS port, you need a X11 server.

> I will also note that, like most of the Ruby community, they have come a  
> LONG way in the past year. There's a wiki with pretty robust-looking  
> documentation and some decent tutorials at:

> [http://wxruby.rubyforge.org/wiki/wiki.pl](http://wxruby.rubyforge.org/wiki/wiki.pl)

I think the problem is that the old version 0.6 is not developed  
further and the new version that uses SWIG for the bindings has only  
one person working on it and the development seem to have stopped.

> There are other GUI toolkits available, but I haven't explored them.  
> Something called "FOX" exists. There's a Qt toolkit that appears to  
> have gotten to a usable alpha state in 2002 and then been abandoned.  
> There may be others.

Don't know about QT but i know a lot about FOX. The worst problem with  
fox is missing I18N and L17N. Documentation is good, maybe the best of  
all documentation available. I hope that the developers of other  
toolkits take a look at it and provide something like this also for there  
toolkits. FOX is very fast but indeed ugly if you don't add a layer on  
top of it.

> **···**
>
> --  
> Best regards, emailto: scholz at scriptolutions dot com  
> Lothar Scholz [http://www.ruby-ide.com](http://www.ruby-ide.com)  
> CTO Scriptolutions Ruby, PHP, Python IDE 's

---

<div class="post-metadata">

### Author: ![Lothar\_Scholz2](https://avatars.discourse-cdn.com/v4/letter/l/f14d63/32.png) [@Lothar\_Scholz2](https://rubytalk.org/u/Lothar_Scholz2)
#### Post date: [11 July 2005 09:26 UTC](https://rubytalk.org/t/a-good-tk/19450/7 "2005-07-11T09:26:47Z")

</div>

Hello Dibya,

> 2. I have used FOX 12 for the 1st version,however the output wasnt  
> very satisfactory.

You mean the look & feel ?  
If this is what you mean then look at my IDE to see what can be done  
with FOX. Sure you need to put some energy into it as some of the  
widgets must be extended.

> 3.For the application,speed will be a concern.

It's a GUI toolkti, so it shouldn't be such a big problem for any  
toolkit.

> **···**
>
> > 4.I just checked wxRuby.........seems to be much better than FOX.
> 
> --  
> Best regards, emailto: scholz at scriptolutions dot com  
> Lothar Scholz [http://www.ruby-ide.com](http://www.ruby-ide.com)  
> CTO Scriptolutions Ruby, PHP, Python IDE 's

---

<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: [11 July 2005 14:23 UTC](https://rubytalk.org/t/a-good-tk/19450/8 "2005-07-11T14:23:28Z")

</div>

Message-ID: \<683246671.20050711154444@scriptolutions.com\>

> Yes, but there is a new widget set that uses the plattform theming  
> engine on each machine, named "Tile" . Don't know if this is already  
> useable and integrated in ruby.

Supported. 😉 However, please use the latest version on CVS.

# Please see "\<ruby-lib-dir\>/tkextlib/SUPPORT\_STATUS" also.  
# Tcl/Tk extensions support on Ruby/Tk is included Ruby 1.8.2  
# or later. I'm sorry but libraries on Ruby 1.8.2 are buggy.  
# So, I recommend to use the latest version.

If Tcl/Tk libraries linked to tcltklib can load "Tile" extension  
(for example, use ActiveTcl binary package), Ruby/Tk can use the  
features of "Tile" extension by "require 'tkextlib/tile'".  
Then, Ruby/Tk can use not only themes written in Tcl/Tk, but also  
themes written in Ruby/Tk. A sample theme defined by Ruby/Tk style  
is "\<ruby-src\>/ext/tk/sample/tkextlib/tile/themes/kroc.rb".

> **···**
>
> From: Lothar Scholz \<mailinglists@scriptolutions.com\>  
> Subject: Re: A good TK  
> Date: Mon, 11 Jul 2005 17:44:49 +0900  
> --  
> Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)

---

<div class="post-metadata">

### Author: ![J-Van](https://avatars.discourse-cdn.com/v4/letter/j/bc8723/32.png) [@J-Van](https://rubytalk.org/u/J-Van)
#### Post date: [11 July 2005 17:12 UTC](https://rubytalk.org/t/a-good-tk/19450/9 "2005-07-11T17:12:51Z")

</div>

First I heard of Tile. Should I use it instead of BWidgets or  
IWidgets or TkTable or whatever else is out there?

> **···**
>
> On 7/11/05, Hidetoshi NAGAI \<nagai@ai.kyutech.ac.jp\> wrote:
> 
> > From: Lothar Scholz \<mailinglists@scriptolutions.com\>  
> > Subject: Re: A good TK  
> > Date: Mon, 11 Jul 2005 17:44:49 +0900  
> > Message-ID: \<683246671.20050711154444@scriptolutions.com\>  
> > \> Yes, but there is a new widget set that uses the plattform theming  
> > \> engine on each machine, named "Tile" . Don't know if this is already  
> > \> useable and integrated in ruby.
> > 
> > Supported. 😉 However, please use the latest version on CVS.
> > 
> > # Please see "\<ruby-lib-dir\>/tkextlib/SUPPORT\_STATUS" also.  
> > # Tcl/Tk extensions support on Ruby/Tk is included Ruby 1.8.2  
> > # or later. I'm sorry but libraries on Ruby 1.8.2 are buggy.  
> > # So, I recommend to use the latest version.
> > 
> > If Tcl/Tk libraries linked to tcltklib can load "Tile" extension  
> > (for example, use ActiveTcl binary package), Ruby/Tk can use the  
> > features of "Tile" extension by "require 'tkextlib/tile'".  
> > Then, Ruby/Tk can use not only themes written in Tcl/Tk, but also  
> > themes written in Ruby/Tk. A sample theme defined by Ruby/Tk style  
> > is "\<ruby-src\>/ext/tk/sample/tkextlib/tile/themes/kroc.rb".

---

<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: [13 July 2005 06:49 UTC](https://rubytalk.org/t/a-good-tk/19450/10 "2005-07-13T06:49:29Z")

</div>

Message-ID: \<c715e64050711101229f0692b@mail.gmail.com\>

> First I heard of Tile. Should I use it instead of BWidgets or  
> IWidgets or TkTable or whatever else is out there?

I don't think so.  
Although Tile extension can change the looks of some kinds of  
basic widgets, it doesn't have the features of other extensions  
and probably cannot change the looks of widgets on other extensions.

> **···**
>
> From: Joe Van Dyk \<joevandyk@gmail.com\>  
> Subject: Re: A good TK  
> Date: Tue, 12 Jul 2005 02:12:51 +0900  
> --  
> Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
