Procedure

TfrmODMedIV.cboRouteClick

Module

fODMedIV

Last Modified

7/15/2014 3:26:42 PM

Visibility

Public/Published

Owner

TfrmODMedIV

Declaration

procedure cboRouteClick(Sender: TObject);

Calls Hierarchy


TfrmODMedIV.cboRouteClick
 └TfrmODMedIV.CreateOtherRoute
   └ShowOtherRoutes
     ├TfrmBase508Form.Create
     │ ├TfrmBase508Form.UpdateAccessibilityActions
     │ ├UnfocusableControlEnter
     │ └AdjustControls
     │   ├TfrmBase508Form.ModifyUnfocusableControl
     │   └..(rec)..
     └SetFormPosition
       └TSizeHolder.GetSize

Called-By Hierarchy


           TfrmODMedIV.cboRouteClick
        TfrmODMedIV.cboRouteChange┤ 
 TfrmODMedIV.txtAllIVRoutesClick┘ │ 
   TfrmODMedIV.cboRouteKeyDown┘   │ 
TfrmODMedIV.txtAllIVRoutesClick...┘ 

Calls

Name Declaration Comments
TfrmODMedIV.CreateOtherRoute function CreateOtherRoute: string; -

Called-By

Name Declaration Comments
TfrmODMedIV.cboRouteChange procedure cboRouteChange(Sender: TObject); -
TfrmODMedIV.txtAllIVRoutesClick procedure txtAllIVRoutesClick(Sender: TObject); -


Source

1525  procedure TfrmODMedIV.cboRouteClick(Sender: TObject);
1526  var
1527  otherRoute, temp: string;
1528  idx, oidx: integer;
1529  begin
1530    inherited;
1531    oidx := cboRoute.Items.IndexOf('OTHER');
1532    if oidx = -1 then exit;
1533    
1534    if cboRoute.ItemIndex = oidx then
1535      begin
1536        otherRoute := CreateOtherRoute;
1537        if length(otherRoute) > 1 then
1538          begin
1539            idx := cboRoute.Items.IndexOf(Piece(OtherRoute, U, 2));
1540            if idx > -1 then
1541              begin
1542                temp := cboRoute.Items.Strings[idx];
1543                //setPiece(temp,U,5,'1');
1544                cboRoute.Items.Strings[idx] := temp;
1545              end
1546            else
1547            begin
1548               cboRoute.Items.Add(otherRoute);
1549               idx := cboRoute.Items.IndexOf(Piece(OtherRoute, U, 2));
1550            end;
1551            cboRoute.ItemIndex := idx;
1552          end
1553        else
1554          begin
1555            cboRoute.ItemIndex := -1;
1556            cboRoute.SetFocus;
1557          end;
1558      end;
1559  end;