Changeset 1167 for trunk/gui/scripts/xylegend.tcl
- Timestamp:
- Sep 29, 2008, 8:08:49 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gui/scripts/xylegend.tcl
r1152 r1167 72 72 public method reset {} 73 73 public method Average {} 74 public method Recolor {} 74 75 public method Check {} 75 76 public method Delete { args } … … 150 151 delete "" 151 152 rename "" 153 recolor "" 152 154 } 153 155 foreach { but icon} $commands { … … 167 169 grid $controls.rename -column 1 -row 2 -sticky w 168 170 grid $controls.delete -column 1 -row 3 -sticky w 171 grid $controls.recolor -column 1 -row 4 -sticky w 169 172 170 173 grid columnconfigure $controls 0 -weight 1 … … 385 388 set nodes [$itk_component(legend) curselection] 386 389 foreach n { hide show toggle raise lower 387 rename average difference delete } {390 rename average difference delete recolor } { 388 391 $itk_component(controls).$n configure -state disabled 389 392 } … … 403 406 } 404 407 1 { 405 foreach n { hide show toggle rename } {408 foreach n { hide show toggle rename recolor } { 406 409 $itk_component(controls).$n configure -state normal 407 410 } 408 411 } 409 412 2 { 410 foreach n { hide show toggle difference average } {413 foreach n { hide show toggle difference average recolor } { 411 414 $itk_component(controls).$n configure -state normal 412 415 } 413 416 } 414 417 default { 415 foreach n { hide show toggle average } {418 foreach n { hide show toggle average recolor } { 416 419 $itk_component(controls).$n configure -state normal 417 420 } … … 536 539 } 537 540 541 542 itcl::body Rappture::XyLegend::Recolor {} { 543 set nodes [$itk_component(legend) curselection] 544 if { $nodes == "" } { 545 return 546 } 547 foreach node $nodes { 548 set elem [$tree_ label $node] 549 if { $lastColorIndex_ == 0 } { 550 set lastColorIndex_ [llength $autocolors_] 551 } 552 incr lastColorIndex_ -1 553 set color [lindex $autocolors_ $lastColorIndex_] 554 $graph_ element configure $elem -color $color 555 set im [$itk_component(legend) entry cget $node -icon] 556 $graph_ legend icon $elem $im 557 } 558 } 538 559 539 560 itcl::body Rappture::XyLegend::SelectAll { } {
Note: See TracChangeset
for help on using the changeset viewer.