# Theming Tk with tile

**URL:** <https://www.ruby-forum.com/t/theming-tk-with-tile/88363>\
**Category:** Ruby\
**Created:** [March 10, 2007, 1:31am UTC](https://www.ruby-forum.com/t/theming-tk-with-tile/88363 "2007-03-10T01:31:36Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sy\_Ali](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/54ee81/32.png) [@Sy\_Ali](https://www.ruby-forum.com/u/Sy_Ali)\
**Post date:** [March 10, 2007, 1:31am UTC](https://www.ruby-forum.com/t/theming-tk-with-tile/88363/1 "2007-03-10T01:31:36Z")

</div>

I have a dream: My own GUI applications looking like other  
applications.

I went hunting around for theming for Tk, and bumped into Tile[1].

Tk being legendarily ugly, tile represents a great new hope that with  
tile it could be elevated to being barely adequate.

I saw a reference that it was available in Ruby’s CVS from sometime in  
2005, suggesting that there is support in the more recent versions of  
Ruby.

I did some hunting, but I couldn’t find any references to how to get it  
going.

Patching together some mailing list references, I think this is how I  
could do it:

$ irb  
require ‘tk’  
require ‘tkextlib/tile’  
Tk::Tile. **Import\_Tile\_Widgets**

The tile require fails since it’s not there. Presumably it’s not  
included with ruby or ruby-tk with my distribution. That’s expected.

I see that there isn’t a gem for tile, or my guess at “gem install  
tile” isn’t right.

I see that I could download tile [2] and built it from source, but  
somehow I doubt this would solve my require problem.

I googled, and I searched the mailing lists, but I can’t find any  
concrete examples of installing or using tile (outside of home  
renovations), and I could use a bit of help…

I would also accept answers of “go use toolkit x instead”, but I  
already intend to do that if I can’t get this going.

Also, is tile something I’d have to package with my program or have a  
person install with my distributed software? How would that work?

[1] tile tk theming [Tile: an improved themeing engine for Tk](http://tktable.sourceforge.net/tile/)  
[2] tile download  
[Download tile-0.7.8.tar.gz (TkTable / Tile / Vu)](http://sourceforge.net/project/downloading.php?group_id=11464&use_mirror=internap&filename=tile-0.7.8.tar.gz&22159438)

---

<div class="post-metadata">

**Author:** ![Sy\_Ali](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/54ee81/32.png) [@Sy\_Ali](https://www.ruby-forum.com/u/Sy_Ali)\
**Post date:** [March 11, 2007, 3:40pm UTC](https://www.ruby-forum.com/t/theming-tk-with-tile/88363/2 "2007-03-11T15:40:52Z")

</div>

From: “Sy Ali” [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
Subject: Theming Tk with tile  
Date: Sat, 10 Mar 2007 09:31:03 +0900  
Message-ID:  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

> I see that I could download tile [2] and built it from source, but  
> somehow I doubt this would solve my require problem.

If your Tcl/Tk can load the tile libraries which you installed,  
Ruby/Tk will load them also.  
Please try to run “/tkextlib/pkg\_checker.rb”.  
When its output includes the line  
“Ready : tile.rb : require-\>{“tile”=\>“0.7.8”}”,  
your Ruby/Tk is ready for Tile extension.  
If not, probably it will be a kind of search path problem.

If you feel a little difficult, please try to use the ActiveTcl  
binary package.

---

<div class="post-metadata">

**Author:** ![Sy\_Ali](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/54ee81/32.png) [@Sy\_Ali](https://www.ruby-forum.com/u/Sy_Ali)\
**Post date:** [March 11, 2007, 4:16pm UTC](https://www.ruby-forum.com/t/theming-tk-with-tile/88363/3 "2007-03-11T16:16:56Z")

</div>

On 3/11/07, Hidetoshi NAGAI [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Please try to run “/tkextlib/pkg\_checker.rb”.  
> When its output includes the line  
> “Ready : tile.rb : require-\>{“tile”=\>“0.7.8”}”,  
> your Ruby/Tk is ready for Tile extension.  
> If not, probably it will be a kind of search path problem.

I think you’re right. pkg\_checker.rb gave me errors [1]

I downloaded activetcl, and did ln -s /opt/ActiveTcl-8.4/lib/tcl8.4/  
/usr/lib/ so that my pkg\_checker.rb could see its libraries. Now  
pkg\_checker runs, but gives me:

\*LACK : tile.rb : require-\>{} FAIL-\>[[“tile”, :package]]

Which is normal since I didn’t install tile yet. =)

But, configuring tile gives me an error about “configuration  
definitions” [2] … where do I find these?

Maybe something is wrong because I’m using a ruby-tk package from my  
distribution (pclinuxos 2007-test3).

Isn’t there a gem for tile? =)

–+

[1] errors with pkg\_checker:

$ /usr/lib/ruby/1.8/tkextlib/pkg\_checker.rb  
/usr/lib/ruby/1.8/tk.rb:1102:in `initialize’: Can’t find a usable  
init.tcl in the following directories: (RuntimeError)  
/usr/lib/tcl8.4 /usr/lib/tcl8.4 /lib/tcl8.4 /usr/library /library  
/tcl8.4.13/library /usr/lib/tcl8.4

This probably means that Tcl wasn’t installed properly.  
from /usr/lib/ruby/1.8/tk.rb:1102:in `new' from /usr/lib/ruby/1.8/tk.rb:1102 from ./pkg_checker.rb:7:in `require’  
from ./pkg\_checker.rb:7

–+

[2] configuring tile gives an error about “configuration definitions”

$ ./configure --with-tcl=/opt/ActiveTcl-8.4/lib/  
checking for correct TEA configuration… ok (TEA 3.5)  
checking for Tcl configuration… found  
/opt/ActiveTcl-8.4/lib/tclConfig.sh  
checking for existence of /opt/ActiveTcl-8.4/lib/tclConfig.sh…  
loading  
checking for Tk configuration… configure: WARNING: Can’t find Tk  
configuration definitions

---

<div class="post-metadata">

**Author:** ![Sy\_Ali](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/54ee81/32.png) [@Sy\_Ali](https://www.ruby-forum.com/u/Sy_Ali)\
**Post date:** [March 11, 2007, 4:30pm UTC](https://www.ruby-forum.com/t/theming-tk-with-tile/88363/4 "2007-03-11T16:30:57Z")

</div>

From: “Sy Ali” [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
Subject: Re: Theming Tk with tile  
Date: Mon, 12 Mar 2007 00:16:14 +0900  
Message-ID:  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

> I downloaded activetcl, and did ln -s /opt/ActiveTcl-8.4/lib/tcl8.4/  
> /usr/lib/ so that my pkg\_checker.rb could see its libraries. Now

Then, possibly, your Ruby/Tk will expect that all Tcl/Tk extensions  
exist on /usr/lib.  
So,

> pkg\_checker runs, but gives me:
> 
> \*LACK : tile.rb : require-\>{} FAIL-\>[[“tile”, :package]]

your Ruby/Tk cannot find Tile libraries.

> Which is normal since I didn’t install tile yet. =)
> 
> But, configuring tile gives me an error about “configuration  
> definitions” [2] … where do I find these?

Please add “–with-tk=/opt/ActiveTcl-8.4/lib” option.

However, if you already have tcltklib.so for Tcl/Tk8.4, please try to  
define “LD\_LIBRARY\_PATH=/opt/ActiveTcl-8.4/lib” env value.  
Then, probably, your Ruby/Tk will use ActiveTcl libraries.
