daisy4u721
Programmer
Does anyone have an idea on how to create a table with columns and rows using tcl.
Any information or idea would be appreciated.
Thanks
Any information or idea would be appreciated.
Thanks
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
set w .2.2
table $w.t -yscrollcommand "$w.yscr set" -xscrollcommand "$w.xscr set"
scrollbar $w.yscr -command "$w.t yview"
scrollbar $w.xscr -command "$w.t xview" -orient horizontal
pack $w.yscr -side right -fill y
pack $w.t -side top
pack $w.xscr -side top -fill x
$w.t configure -variable m1 -bg white -width 12 -height 8
$w.t configure -rows $i1 -titlerows 1
$w.t configure -cols 5 -colwidth 16
I meant a 2D array. It's actually $i1 (set somewhere else) rows by 5 columns.myself said:m1 is a 2x2 array
First you have to load the library:% invalid command name "table"
load tktable.dll
and all subsequent:% bad window path name ".2.2"
package require tcom
set application [::tcom::ref createobject "Word.Application"]
$application Visible 1
$application DisplayAlerts 0
set docs [$application Documents]
set doc [$docs Add ]
[$doc Tables] Add [[$application Selection] Range] [set NumRows 3] [set NumColumns 4]
package require tcom
set application [::tcom::ref createobject "Word.Application"]
$application Visible 1
$application DisplayAlerts 0
set docs [$application Documents]
set doc [$docs Add ]
[$doc Tables] Add [[$application Selection] Range] [set NumRows 3] [set NumColumns 4]
[$application Selection] TypeText "Title"
[$application Selection] TypeText "Title\t"
[$application Selection] TypeText "Date"
package require tcom
set application [::tcom::ref createobject "Word.Application"]
$application Visible 1
$application DisplayAlerts 0
set docs [$application Documents]
set doc [$docs Add ]
[$doc Tables] Add [[$application Selection] Range] [set NumRows 1] [set NumColumns 3]
[$::application Selection] TypeText "Title"
[$::application Selection] MoveRight
[$::application Selection] TypeText "Date"
[$::application Selection] MoveRight
[$::application Selection] TypeText "Number"
[$::application Selection] MoveRight