proc set_depth_from_value_initial {table depth_from depth_to} {
set rowNum [$table getEditingRow]
if {$rowNum == 0} {
$depth_from setCurrentValue 0 0
} else {
if {$rowNum == -1} {
set  ndx1 [$table getRowCount];
incr ndx1 -1
set  ndx2 $ndx1
incr ndx2 -1
set  lastDepth [$depth_to getCurrentValue $ndx2]
if {"$lastDepth" == ""} {
$depth_from setCurrentValue $ndx1 [$depth_from getCurrentValue $ndx2]
} else {
$depth_from setCurrentValue $ndx1 [$depth_to getCurrentValue $ndx2]
}
$depth_from setInputAllowed $ndx1 false
} else {
$depth_from setCurrentValue [$depth_to getCurrentValueRelative -1]
$depth_from setInputAllowed false
}
}
}
GuidoForm frm01132 {
-default_buttons
-label "Enter Charging Details"
-layout BoxLayout Y_AXIS
-tip "01132_TIP_1"
GuidoScrollPane charging_details_scroll {
-height 6
GuidoTable charging_details {
-instances 1 1 26
-interactive true
GuidoField depth_from {
-label "Depth from"
-format double
-display_length 6
-action initial {[set_depth_from_value_initial $charging_details $depth_from $depth_to]}
-tip "01132_TIP_2"
}
GuidoField depth_to {
-label "Depth to"
-display_length 6
-format double
-legacy_focus_gained_action
-max_length 12
-null false
-translate none
-tip "01132_TIP_3"
}
GuidoComboBox explosive {
-label Explosive
-display_length 9
-format none
-max_length 9
-null false
-exclusive false
-legacy_validation
-legacy_dependency
-tip "01132_TIP_4"
}
GuidoComboBox detonator {
-label Detonator
-max_length 11
-display_length 9
-format none
-null true
-exclusive false
-legacy_action
-tip "01132_TIP_5"
}
GuidoField num_of_dets {
-label "No. of detonators"
-display_length 6
-format integer
-max_length 12
-default 1
-low_bound 0
-null false
-translate none
-tip "01132_TIP_10"
}
GuidoComboBox det_position {
-label "Detonator position"
-max_length 11
-display_length 3
-format none
-null true
-exclusive false
-tip "01132_TIP_6"
}
GuidoComboBox booster {
-label Booster
-max_length 11
-display_length 9
-format none
-null true
-exclusive false
-tip "01132_TIP_7"
}
GuidoField num_of_boosters {
-label "Number of booster cartridges"
-display_length 6
-format double
-max_length 12
-default 1.0
-low_bound 0.0
-null false
-translate none
-tip "01132_TIP_9"
}
GuidoComboBox delay {
-label Delay
-display_length 9
-format none
-max_length 5
-null true
-exclusive false
-legacy_action
-tip "01132_TIP_8"
}
}
}
GuidoPanel panel_1 {
-layout BoxLayout X_AXIS
GuidoPanel panel_2 {
-layout BoxLayout X_AXIS
-border etched true
-label "End hole method"
-tip "01132_TIP_002"
GuidoButtonGroupPanel end_charge_method {
-layout BoxLayout Y_AXIS
GuidoRadioButton end_charge_method_button_1 {
-caption "adjust charge to hole depth"
-selected_value "adjust charge to hole depth"
}
GuidoRadioButton end_charge_method_button_2 {
-caption "adjust charge on tolerance"
-selected_value "adjust charge on tolerance"
}
}
GuidoPanel panel_3 {
-layout BoxLayout Y_AXIS
GuidoFiller filler_1 {
-height 1.5
}
GuidoPanel panel_4 {
-layout BoxLayout X_AXIS
GuidoField tolerance_distance {
-label Distance
-display_length 2
-max_length 10
-format double
-low_bound 0
-translate upper
-null false
-default 0
-dependency {"[ $end_charge_method getCurrentValue]" == "adjust charge on tolerance"}
-tip "01132_TIP_003"
}
}
}
}
}
GuidoPanel panel_5 {
-layout BoxLayout X_AXIS
GuidoField minimum_charge_length {
-label "Minimum charge length"
-display_length 2
-max_length 10
-format double
-low_bound 0
-translate upper
-null false
-default 0
-tip "01132_TIP_004"
}
}
}
