proc set_nulls { name type } {
if {[ $name getCurrentValue ] == ""} {
$type setNullAllowed true
} else {
$type setNullAllowed false
}
}
proc decimalCallbackInitial {} {
global decimals
$decimals setNullAllowed false
}
GuidoForm frm20150 {
-default_buttons
-label "Add Attributes"
-layout Borderlayout
-tip "20150_TIP_002"
GuidoScrollPane frm20150_19 {
-height 9
GuidoTable attributes {
-instances 1 1 50
-interactive true
-position centre
GuidoField name {
-display_length 13
-format none
-label "Attribute Name"
-max_length BM_MAX_ATT_NAME_LEN
-translate lower
}
GuidoComboBox type {
-display_length 10
-format none
-dependency {"[$name getCurrentValue]" != ""}
-label Type
-max_length 10
-value_in BLANK_LINE character real integer float calculated
-action focusGained {[set_nulls $name $type]}
}
GuidoField decimals {
-dependency {"[ $type getCurrentValue]" == "real" ||
"[ $type getCurrentValue]" == "float" ||
"[ $type getCurrentValue]" == "calculated"}
-display_length 5
-low_bound 0
-high_bound 9
-format integer
-label Decimals
-max_length 64
-translate none
-action initial {[decimalCallbackInitial]}
}
GuidoField bgv {
-dependency {"[ $type getCurrentValue]" != "calculated" && "[$name getCurrentValue]" != ""}
-display_length 13
-format none
-label "Background Value"
-max_length 64
-translate none
}
GuidoField description {
-display_length 30
-format none
-dependency {"[$name getCurrentValue]" != ""}
-legacy_validation
-label "Description / Expression"
-max_length BM_MAX_ATT_DESC_LENGTH
-translate none
}
}
}
}
