Ignore:
Timestamp:
May 13, 2006, 1:13:19 PM (18 years ago)
Author:
mmc
Message:

Added a new <enable> parameter to all inputs. Controls can now be
enabled/disabled based on the status of other controls. If a group
is disabled, it disappears entirely. If a parameter is enabled to
a hard-coded "off" value, then it acts like a hidden (secret)
parameter.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gui/scripts/imageentry.tcl

    r428 r437  
    1616itcl::class Rappture::ImageEntry {
    1717    inherit itk::Widget
     18
     19    itk_option define -state state State "normal"
    1820
    1921    constructor {owner path args} { # defined below }
     
    217219    }
    218220}
     221
     222# ----------------------------------------------------------------------
     223# CONFIGURATION OPTION: -state
     224# ----------------------------------------------------------------------
     225itcl::configbody Rappture::ImageEntry::state {
     226    set valid {normal disabled}
     227    if {[lsearch -exact $valid $itk_option(-state)] < 0} {
     228        error "bad value \"$itk_option(-state)\": should be [join $valid {, }]"
     229    }
     230    $itk_component(image) configure -state $itk_option(-state)
     231}
Note: See TracChangeset for help on using the changeset viewer.