I am trying to attach a TkTable to a different parent other than the top level widget. Specifically, I would like the TkTable to be attached to a page (Blank Page) within a TabeNoteBook widget. The TabNoteBook widget is created as follows, followed by the attachment of the TkTable widget. I am using the pack to avoid the grid/pack conflict of widget management. How do you attach the TkTable widget to the desired (page) widget?
iwidgets::tabnotebook .tnb \
-width 6i -height 2.0i -tabpos n
# pack .tnb -padx 4 -pady 4 -expand true -side right -side left -fill x
# Page numer 1
set page [.tnb add -label "Part Info"]
array set table {
rows 100
cols 12
table .table
}
set t $table(table)
table $t \
-rows $table(rows) \
-cols $table(cols) \
-cache 1 \
-titlerows 1 \
-titlecols 1 \
-yscrollcommand { .tsy set } \
-xscrollcommand { .tsx set } \
-width 5 -height 5 \
-coltagcommand colorize \
-flashmode on \
-selectmode extended \
-colstretch unset \
-rowstretch unset \
-validate yes \
-vcmd {if {![%W tag includes title %C]} { validate %c %S } }
scrollbar .tsy -command [list $t yview]
scrollbar .tsx -command [list $t xview] -orient horizontal
pack .tsy -expand false -fill y -side left -side right
pack .tsx -expand false -fill x -side top -side bottom
pack .table -expand true -side top -side bottom -fill both
pack .tnb -expand false -side top -side bottom -fill both
iwidgets::tabnotebook .tnb \
-width 6i -height 2.0i -tabpos n
# pack .tnb -padx 4 -pady 4 -expand true -side right -side left -fill x
# Page numer 1
set page [.tnb add -label "Part Info"]
array set table {
rows 100
cols 12
table .table
}
set t $table(table)
table $t \
-rows $table(rows) \
-cols $table(cols) \
-cache 1 \
-titlerows 1 \
-titlecols 1 \
-yscrollcommand { .tsy set } \
-xscrollcommand { .tsx set } \
-width 5 -height 5 \
-coltagcommand colorize \
-flashmode on \
-selectmode extended \
-colstretch unset \
-rowstretch unset \
-validate yes \
-vcmd {if {![%W tag includes title %C]} { validate %c %S } }
scrollbar .tsy -command [list $t yview]
scrollbar .tsx -command [list $t xview] -orient horizontal
pack .tsy -expand false -fill y -side left -side right
pack .tsx -expand false -fill x -side top -side bottom
pack .table -expand true -side top -side bottom -fill both
pack .tnb -expand false -side top -side bottom -fill both