Home     |     .Net Programming    |     cSharp Home    |     Sql Server Home    |     Javascript / Client Side Development     |     Ajax Programming

Ruby on Rails Development     |     Perl Programming     |     C Programming Language     |     C++ Programming     |     IT Jobs

Python Programming Language     |     Laptop Suggestions?    |     TCL Scripting     |     Fortran Programming     |     Scheme Programming Language


 
 
Cervo Technologies
The Right Source to Outsource

MS Dynamics CRM 3.0

TCL(Tool Command Language) Scripting

tablelist delete current row


How do I delete a row where the cursor is in a tablelist?
On May 28, 6:41 pm, tcltk@aol.com wrote:

> How do I delete a row where the cursor is in a tablelist?

.toplevel.mytablelist delete active

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.

On May 29, 7:22 am, tcltk@aol.com 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"
      }

Add to del.icio.us | Digg this | Stumble it | Powered by Megasolutions Inc