Andreas Rozek Hints for Reading List of Recent Changes Guestbook Entry Contact the Author  Deutsche Version  HomePage Previous Topic Next Topic  First Page of Current Topic Next Page Previous Page

TkLua_01a - Display of predefined Tk Colors

Similar to "TkLua_01", the program "TkLua_01a" also produces a color table - but now the table contains all predefined Tk colors. Again, it is possible to click on every color to see the corresponding RGB definition.

Because of the large number of colors it was necessary to place the table within a separate frame object and to associate two scrollbar objects in order to position the (visible area of the) table within that frame. Apart from these changes, the program is structured like its predecessor "TkLua_01".

"TkLua_01a" should be invoked without any command line arguments

  lua TkLua_01a.lua

and presents itself as shown below (be patient, please, it takes a while for the window to come up)

Screenshot of the TkLua_01a Application Window

Source Code

The source code of this example is available for download:

References

[1] Roberto Ierusalimschy, Luiz Henrique de Figueiredo, Waldemar Celes
Reference Manual of the Programming Language Lua 4.0
(see http://www.lua.org/manual)
the reference manual contains any relevant information about the language itself, the set of standard libraries and its interface to the run-time environment;
[2] Waldemar Celes
tklua - Binding Tk to Lua
(see http://www.tecgraf.puc-rio.br/~celes/tklua/)
TkLua provides support for Tk widgets (allowing to construct graphical user interfaces) from within Lua scripts. The given web page describes the "basic concepts" behind TkLua and explains how to use it from within Lua scripts;
[3] Christian Vogler
TkLua (4.0a1)
(see http://www.cis.upenn.edu/~cvogler/lua/tklua.html)
since the original distribution of TkLua [2] has been developed for Lua versions prior to 4.0, Christian Vogler ported TkLua to the new Lua 4.0 API;
[4] Tcl/Tk 8.3.4 Manual
(see http://www.scriptics.com/man/tcl8.3/)
if you plan to use TkLua for your Lua script, you will hardly survive without the Tcl/Tk documentation - it can be viewed online at the given address (unless you already downloaded the Tcl/Tk distribution onto your system and installed it there);

Disclaimer

Please, consider also the author's Disclaimer!

http://www.Andreas-Rozek.de/Lua/Acquainting/TkLua_01a_en.html    (last Modification: 15.04.2002)