Posted to tcl by de at Thu Nov 13 00:52:41 GMT 2008view pretty

package require Tktable

set aeros_var(0,0) "Aeros"
set aeros_var(0,1) "Identifier"
set aeros_var(0,2) "Type"
table .aeros_table -cols 3 -rows 1 -titlecols 1 -titlerows 1 \
    -variable aeros_var -yscrollcommand ".aeros_table_yscroll set"
scrollbar .aeros_table_yscroll -command ".aeros_table yview"
button .aeros_add_button -text "add" -command aeros_add

pack .aeros_table -side left -anchor n
pack .aeros_table_yscroll -side left -fill y
pack .aeros_add_button 


proc aeros_add {} \
{
	global array aeros_var {}

	set rows [.aeros_table cget -rows]
	.aeros_table configure -rows [expr 1 + $rows]
	set aeros_var($rows,0) $rows
}