Changeset 2154 for trunk/lang/tcl/scripts/objects/number
- Timestamp:
- Mar 27, 2011, 11:32:25 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lang/tcl/scripts/objects/number/number.rp
r2152 r2154 18 18 help http://rappture.org/wiki/rp_xml_ele_number 19 19 20 attr default -title "Default Value" -type string:validate=number -path default 20 attr default -title "Default Value" -type string:validate=number -path default -only input 21 21 attr units -title "Units of Measurement" -type units -path units 22 attr min -title "Minimum Value" -type string:validate=number -path min 23 attr max -title "Maximum Value" -type string:validate=number -path max 24 attr icon -title "Icon" -type image:maxsize=20,rescale=yes -path about.icon 25 attr color -title "Color" -type color -path color 22 attr min -title "Minimum Value" -type string:validate=number -path min -only input 23 attr max -title "Maximum Value" -type string:validate=number -path max -only input 24 attr icon -title "Icon" -type image:maxsize=20,rescale=yes -path about.icon -only input 25 attr color -title "Color" -type color -path color -only input 26 26 27 27 check default { … … 76 76 && ![string equal [Rappture::Units::System::for $units] $base]} { 77 77 return [list error "Units for maximum value don't match the expected units for this value"] 78 } 79 } 80 } 81 82 check color { 83 if {$attr(color) ne ""} { 84 if {$attr(min) eq "" || $attr(max) eq ""} { 85 return [list warning "The color for this number won't show up unless both minimum and maximum values are set. The color indicates the current value in the range between the min/max limits."] 78 86 } 79 87 }
Note: See TracChangeset
for help on using the changeset viewer.