/* * Copyright (c) 1994 by Roland King (rols@lehman.com) * All rights reserved. * See the file COPYRIGHT for the copyright notes. */ /* * README updated for tkTable v0.55+ by ellson@lucent.com (John Ellson) * README updated for tkTable v1.0+ by jhobbs@cs.uoregon.edu (Jeffrey Hobbs) * * tkTable v0.55+ includes additions contributed by: * tmoore@spatial.ca (Tom Moore) * wangnick@orthogon.de (Sebastian Wangnick) * paulf@lamont.ldgo.columbia.edu * peter@bj-ig.de (Peter Brueckner) * jhobbs@cs.uoregon.edu (Jeffrey Hobbs) * ellson@lucent.com (John Ellson) */ ************************************* The Tk Table Widget Version 1.0+ ************************************* INTRODUCTION This is the first release of a table/matrix widget as an extension to tk/tcl. The basic features of the widget are: * written entirely in C and X-lib * variable width columns / height rows * row and column titles * attaches to an array variable * supports standard TK reliefs, fonts, etc. * x/y scrollbar support * has 'tag' styles per row, column or cell to change colo(u)rs, font, relief or anchor position * in-cell editing - returns value back to array * different editing modes (or disabled) * can have a 'selected cell' or not * 3 drawing modes to get optimal performance for larger tables or slower machines. * optional 'flashes' when things update * can be configured to 'stretch' rows and columns to fill an enclosing widget * support for Tk Kanji patch BUILDING THE WIDGET 1. Uncompress and unpack the distribution gzip -d tkTable.tar.gz tar -xf tkTable.tar This will create a subdirectory tkTable with all the files in it. 2. Configure cd tkTable ./configure --prefix=/usr/local tkTable uses information left in tkConfig.sh when you built tk. 3. Make and Install make make install tkTable is built to comply to the latest tcl package conventions. 4. Use it Start a regular wish interpreter, load the library, and use the table. Or use the "tablewish" interpreter that has tktable built in. There are a few test scripts in the demos directory which you can source. The one called basic.tcl will create a table, fill an array and attach it to the table. It also demonstrates the use scrollbars and fixed titles. One of the cells will change a few moments later and you will see the cell flash. This widget is not compatible with versions below 0.60. Please see the notes in UPGRADING if you used a previous release of tkTable. 5. Read the manpage There is a manpage that briefly describes the commands the widget will understand and respond to. The best way is just to try them out. THINGS TO WATCH OUT FOR Packing The table tries not to allocate huge chunks of screen real estate if you ask it for a lot of rows and columns. You can always stretch out the frame or explicitly tell it how big it can be. If you want to stretch the table, remember to pack it with fill both and expand on. Array The array elements for the table are of the form array(2,3) etc. Make sure there are no spaces around the ','. You may have negative indices Editing If you can't edit, remember that the focus model in tk is explicit, so you need to click on the table or give it the focus command. Just having a selected cell is not the same thing as being able to edit. You also need the editing cursor. If you can't get the cursor, make sure that you actually have a variable assigned to the table. COMMENTS, BUGS, etc. * Please can you send comments and bug reports to ellson@lucent.com or jhobbs@cs.uoregon.edu and we'll do our best at addressing them. This is not a primary project for any of the authors. * If you find a bug, a short piece of Tcl that exercises it would be very useful, or even better, compile with debugging and specify where it crashed in that short piece of Tcl.