Re: tablelist delete current row
- From: tcltkdev@xxxxxxx
- Date: 30 May 2007 00:02:47 -0700
On May 29, 7:22 am, tcltk...@xxxxxxx wrote:
ID No. Last Name First Name
-----------------------------------------------------
1234 Smith John
0070 Bond James
7890 Bauer Jack
Based on the illustration above, how do I loop through the tablelist
to get similar output above? I want to process all the rows and
columns in the tablelist.
set rowcount [.toplevel.mytablelist size] ; # Get number of rows
puts "ID No. Last Name First Name"
puts "-----------------------------------------------------"
# Process all rows in tablelist
for { set i 0 } { $i < $rowcount } { incr i } {
set record [.toplevel.mytablelist rowcget $i -text] ; #
Process a row
set IDNo [ lindex $record 0 ]
set LastName [ lindex $record 1 ]
set FirstName [ lindex $record 2 ]
puts "$IDNo $LastName $FirstName"
}
.
- References:
- tablelist delete current row
- From: tcltkdev
- Re: tablelist delete current row
- From: tcltkdev
- Re: tablelist delete current row
- From: tcltkdev
- tablelist delete current row
- Prev by Date: Re: PROPOSAL: Tcl equivalent to .NET interop
- Next by Date: Re: Making tcl/tk work correctly with a wide-screen monitor
- Previous by thread: Re: tablelist delete current row
- Next by thread: Bypassing rename traces, feature or bug?
- Index(es):
Relevant Pages
|