Thanks to "bong"'s help, I got the TkTable Widget within a tab notebook widget. Now the next problem appeared. When a cell is selected for text entry in the table, a pop up message appears - "Error: can't read "page": no such variable. Any ideas as to why the underlying editor can't find the variable "page"?
=========================================
package require Iwidgets 4.0
source [file join [file dirname [info script]] loadtable.tcl]
# ----------------------------------------------------------------------
# tabnotebook in [incr Widgets]
# ----------------------------------------------------------------------
option add *textBackground seashell
option add *Tabnotebook.backdrop DimGray
option add *Scale.width 8
iwidgets::tabnotebook .tnb \
-width 6i -height 2.90i -tabpos n
set page [.tnb add -label "Spread Sheet Page"]
# -----------------------------------------------------
# Build a frame - bind in the table spreadsheet stuff
# -----------------------------------------------------
frame $page.myFrame -width 20 -height 20 -borderwidth 2 -relief raised
pack $page.myFrame -side top -side bottom -expand true -fill both -pady 4
array set table {
rows 100
cols 9
table .table
}
set t $table(table)
scrollbar $page.myFrame.tsy -command [list $page.myFrame.table yview]
scrollbar $page.myFrame.tsx -command [list $page.myFrame.table xview] -orient horizontal
table $page.myFrame.table \
-rows $table(rows) \
-cols $table(cols) \
-cache 1 \
-titlerows 1 \
-titlecols 1 \
-width 5 -height 5 \
-coltagcommand colorize \
-flashmode on \
-selectmode extended \
-colstretch unset \
-rowstretch unset \
-xscrollcommand { $page.myFrame.tsx set } \
-yscrollcommand { $page.myFrame.tsy set } \
-validate no
pack $page.myFrame.tsy -expand false -fill y -side left -side right
pack $page.myFrame.tsx -expand false -fill x -side top -side bottom
pack $page.myFrame.table -expand true -side top -side bottom -fill both
pack .tnb -expand true -side top -side bottom -fill both
=====================================================
=========================================
package require Iwidgets 4.0
source [file join [file dirname [info script]] loadtable.tcl]
# ----------------------------------------------------------------------
# tabnotebook in [incr Widgets]
# ----------------------------------------------------------------------
option add *textBackground seashell
option add *Tabnotebook.backdrop DimGray
option add *Scale.width 8
iwidgets::tabnotebook .tnb \
-width 6i -height 2.90i -tabpos n
set page [.tnb add -label "Spread Sheet Page"]
# -----------------------------------------------------
# Build a frame - bind in the table spreadsheet stuff
# -----------------------------------------------------
frame $page.myFrame -width 20 -height 20 -borderwidth 2 -relief raised
pack $page.myFrame -side top -side bottom -expand true -fill both -pady 4
array set table {
rows 100
cols 9
table .table
}
set t $table(table)
scrollbar $page.myFrame.tsy -command [list $page.myFrame.table yview]
scrollbar $page.myFrame.tsx -command [list $page.myFrame.table xview] -orient horizontal
table $page.myFrame.table \
-rows $table(rows) \
-cols $table(cols) \
-cache 1 \
-titlerows 1 \
-titlecols 1 \
-width 5 -height 5 \
-coltagcommand colorize \
-flashmode on \
-selectmode extended \
-colstretch unset \
-rowstretch unset \
-xscrollcommand { $page.myFrame.tsx set } \
-yscrollcommand { $page.myFrame.tsy set } \
-validate no
pack $page.myFrame.tsy -expand false -fill y -side left -side right
pack $page.myFrame.tsx -expand false -fill x -side top -side bottom
pack $page.myFrame.table -expand true -side top -side bottom -fill both
pack .tnb -expand true -side top -side bottom -fill both
=====================================================