title: Tcl/Tk front end to a database: how to show large amounts of relational data
body: <p>I am developing a front end to a SQLite3 database in tcl/tk.  I extract some of the data I need to show using a query and calculate other columns in Tcl.  All the data is in a large list.  Now, I want to show this data in a structured format - it is tabular data and the number of columns is fixed, but the number of rows will depend on the criteria entered by the user (which determines the query's WHERE conditions and therefore determines the number of rows).</p>
  
  <p>What I ideally want is a window in which there is a fixed frame on top with buttons to (a) close the window and (b) to show a summary table (which will be fixed format in terms of both rows and columns).  Then will come the table headers which I don't want to scroll out of view (so this will be another fixed frame, but the table may be wider than my window, so I need this part to be scrolled horizontally in sync with the actual data table that comes next).  Then comes the table which should have both horizontal and vertical scrollbars.  And then at the bottom is another fixed frame with buttons that take me to the first record and last record (without having to scroll up and down).</p>
  
  <p>What is the best way to accomplish this in tk?  The frame at the top and the bottom, I can accomplish with not much effort.  The actual table is the part I am having trouble with.  I have thought about creating a frame for the data contents and gridding it with the data I need to display in the form of labels, but I don't know whether that will be fast.  I also don't know how to keep the headers from scrolling vertically out of view, but if I add separate scrollbars for it independent of the table, I don't know how to keep its horizontal scroll in sync with the horizontal scroll of the data below it.  I also don't know whether a frame can be scrolled vertically and horizontally.  As you can tell, I am somewhat new to this, so any help would be appreciated.</p>
  
  <p>Thank you.</p>