Procedure

TfrmARTAllergy.cboSymptomsMouseClick

Module

fARTAllgy

Last Modified

7/15/2014 3:26:36 PM

Visibility

Public/Published

Owner

TfrmARTAllergy

Declaration

procedure cboSymptomsMouseClick(Sender: TObject);

Calls Hierarchy


TfrmARTAllergy.cboSymptomsMouseClick
 └TfrmARTAllergy.ControlChange
   └FMNow

Called-By Hierarchy


TfrmARTAllergy.cboSymptomsMouseClick
 TfrmARTAllergy.cboSymptomsKeyDown┘ 

Calls

Name Declaration Comments
TfrmARTAllergy.ControlChange procedure ControlChange(Sender: TObject); -

Called-By

Name Declaration Comments
TfrmARTAllergy.cboSymptomsKeyDown procedure cboSymptomsKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState); -


Source

1104  procedure TfrmARTAllergy.cboSymptomsMouseClick(Sender: TObject);
1105  const
1106    TC_SS_MAX = 'Too many signs/symptoms';
1107    TX_SS_MAX = 'A maximum of 38 signs/symptoms may be selected.';
1108  var
1109    x: string;
1110  begin
1111    inherited;
1112    with cboSymptoms do if (ItemIndex < 0) or (Text = '') or (ItemID = '') then exit;
1113    if (lstSelectedSymptoms.SelectByID(cboSymptoms.ItemID) > -1) or
1114       (lstSelectedSymptoms.Items.IndexOf(cboSymptoms.Text) > -1) then exit;
1115    if (lstSelectedSymptoms.Count + 1) > 38 then
1116    begin
1117      InfoBox(TX_SS_MAX, TC_SS_MAX, MB_ICONERROR or MB_OK);
1118      exit;
1119    end;
1120    Changing := True;
1121    if cboSymptoms.ItemIndex > -1 then
1122      begin
1123        with cboSymptoms do
1124          if Piece(Items[ItemIndex], U, 3) <> '' then
1125            x := ItemID + U + Piece(Items[ItemIndex], U, 3)
1126          else
1127            x := ItemID + U + Piece(Items[ItemIndex], U, 2);
1128        with lstSelectedSymptoms do
1129          begin
1130            Items.Add(x);
1131            SelectByID(cboSymptoms.ItemID);
1132          end;
1133      end ;
1134  (*  else                             Free-text entries no longer allowed.
1135      with lstSelectedSymptoms do
1136        begin
1137          Items.Add('FT' + U + cboSymptoms.Text);
1138          ItemIndex := Items.Count - 1;
1139        end;*)
1140    Changing := False;
1141    ControlChange(Self)
1142  end;