Changeset 354
- Timestamp:
- Dec 4, 2009 5:04:43 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified trunk/addcmds.tcl ¶
- Property rcs:date changed from 2000/10/17 23:59:32 to 2000/11/27 21:05:56
- Property rcs:lines changed from +10 -10 to +51 -9
- Property rcs:rev changed from 1.14 to 1.15
r326 r354 366 366 } 367 367 set newhist(banklist) {} 368 foreach child [ pack slaves$np.bank] {destroy $child}368 foreach child [winfo children $np.bank] {destroy $child} 369 369 # is this a properly formatted file? 370 370 if {$tcl_platform(platform) == "windows"} { … … 394 394 scan $line "BANK%d" num 395 395 lappend newhist(banklist) $num 396 # compute last point 397 set tmax 0 398 catch { 399 scan $line "BANK%d%d%d%s%f%f" num nchan nrec rest start step 400 set tmax [expr ($start + $step*($nchan-1))/100.] 401 } 402 set newhist(tmax$num) $tmax 396 403 } 397 404 # check for "Instrument parameter file" line … … 433 440 # scan for BANK lines 434 441 if {[string first BANK $line] == 0} { 435 scan $line "BANK%d" num 442 scan $line "BANK%d" num 436 443 lappend newhist(banklist) $num 444 # compute last point 445 set tmax 0 446 catch { 447 scan $line "BANK%d%d%d%s%f%f" num nchan nrec rest start step 448 set tmax [expr ($start + $step*($nchan-1))/100.] 449 } 450 set newhist(tmax$num) $tmax 437 451 } 438 452 # check for "Instrument parameter file" line … … 457 471 set newhist(rawfile) $inp 458 472 } 473 set row 0 474 set col -1 459 475 foreach i $newhist(banklist) { 460 pack [radiobutton $np.bank.$i -text $i \ 461 -variable newhist(banknum) -value $i] -side left 476 if {$col > 8} { 477 set col -1 478 incr row 479 } 480 grid [radiobutton $np.bank.$i -text $i -command SetTmax \ 481 -variable newhist(banknum) -value $i] \ 482 -column [incr col] -row $row -sticky w 462 483 # only 1 choice, so set it 463 if {[llength $newhist(banklist)] == 1} {set newhist(banknum) $i} 464 } 484 if {[llength $newhist(banklist)] == 1} { 485 set newhist(banknum) $i 486 SetTmax 487 } else { 488 set newhist(2tLimit) {} 489 set newhist(LimitMode) {} 490 } 491 } 492 } 493 494 proc SetTmax {} { 495 global newhist 496 set num $newhist(banknum) 497 set newhist(2tLimit) $newhist(tmax$num) 498 set newhist(LimitMode) 1 465 499 } 466 500 … … 495 529 } 496 530 set newhist(instbanks) {} 497 foreach child [ pack slaves$np.set] {destroy $child}531 foreach child [winfo children $np.set] {destroy $child} 498 532 # is this a properly formatted file? 499 533 if {$tcl_platform(platform) == "windows"} { … … 568 602 set newhist(instfile) $inp 569 603 } 604 set col -1 605 set row 0 570 606 for {set i 1} {$i <= $newhist(instbanks)} {incr i} { 571 pack [radiobutton $np.set.$i -text $i \ 572 -variable newhist(setnum) -value $i] -side left 607 if {$col > 8} { 608 set col -1 609 incr row 610 } 611 grid [radiobutton $np.set.$i -text $i \ 612 -variable newhist(setnum) -value $i] \ 613 -column [incr col] -row $row -sticky w 614 573 615 if {$newhist(instbanks) == 1} {set newhist(setnum) $i} 574 616 }
Note: See TracChangeset
for help on using the changeset viewer.