Ignore:
Timestamp:
Jul 7, 2010, 4:31:10 PM (14 years ago)
Author:
Kevin Toppenberg
Message:

Upgrade to version 27

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cprs/trunk/CPRS-Chart/Encounter/fVisitType.pas

    r456 r829  
    66  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
    77  fPCEBase, StdCtrls, CheckLst, ORCtrls, ExtCtrls, Buttons, uPCE, rPCE, ORFn, rCore,
    8   ComCtrls, mVisitRelated;
     8  ComCtrls, mVisitRelated, VA508AccessibilityManager;
    99
    1010type
    1111  TfrmVisitType = class(TfrmPCEBase)
    12     lblVType: TLabel;
     12    pnlTop: TPanel;
     13    splLeft: TSplitter;
     14    splRight: TSplitter;
     15    pnlLeft: TPanel;
     16    lstVTypeSection: TORListBox;
     17    pnlMiddle: TPanel;
     18    fraVisitRelated: TfraVisitRelated;
     19    pnlSC: TPanel;
    1320    lblSCDisplay: TLabel;
    14     lblVTypeSection: TLabel;
    1521    memSCDisplay: TCaptionMemo;
    16     lbProviders: TORListBox;
    17     lblCurrentProv: TLabel;
    18     cboPtProvider: TORComboBox;
    19     lblProvider: TLabel;
     22    pnlBottom: TPanel;
    2023    btnAdd: TButton;
    2124    btnDelete: TButton;
    2225    btnPrimary: TButton;
    23     fraVisitRelated: TfraVisitRelated;
    24     lstVTypeSection: TORListBox;
    25     lbxVisits: TORListBox;
     26    pnlBottomLeft: TPanel;
     27    lblProvider: TLabel;
     28    cboPtProvider: TORComboBox;
     29    pnlBottomRight: TPanel;
     30    lbProviders: TORListBox;
     31    lblCurrentProv: TLabel;
     32    lblVTypeSection: TLabel;
     33    pnlModifiers: TPanel;
    2634    lbMods: TORListBox;
    2735    lblMod: TLabel;
    28     pnlMain: TPanel;
    29     pnlLeft: TPanel;
    30     splLeft: TSplitter;
     36    pnlSection: TPanel;
     37    lbxVisits: TORListBox;
     38    lblVType: TLabel;
    3139    procedure lstVTypeSectionClick(Sender: TObject);
    3240    procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean);
     
    4351    procedure FormResize(Sender: TObject);
    4452    procedure lbxVisitsClickCheck(Sender: TObject; Index: Integer);
    45     procedure splLeftMoved(Sender: TObject);
    46     procedure splRightMoved(Sender: TObject);
    4753    procedure lbModsClickCheck(Sender: TObject; Index: Integer);
    4854    procedure lbxVisitsClick(Sender: TObject);
     55    procedure memSCDisplayEnter(Sender: TObject);
    4956  protected
    5057    FSplitterMove: boolean;
     
    7683
    7784uses
    78   fEncounterFrame, uCore, uConst;
     85  fEncounterFrame, uCore, uConst, VA508AccessibilityRouter;
    7986
    8087const
     
    198205  RefreshProviders;
    199206  FLastMods := uEncPCEData.VisitType.Modifiers;
     207  fraVisitRelated.TabStop := FALSE;
    200208end;
    201209
     
    325333  v, i: integer;
    326334  s: string;
     335  padding, size: integer;
     336  btnOffset: integer;
    327337begin
    328338  if FSplitterMove then
    329339    FSplitterMove := FALSE
    330340  else
    331     begin
    332       inherited;
    333       FSectionTabs[0] := -(lbxVisits.width - LBCheckWidthSpace - MainFontWidth - ScrollBarWidth);
    334       FSectionTabs[1] := -(lbxVisits.width - (6*MainFontWidth) - ScrollBarWidth);
    335       if(FSectionTabs[0] <= FSectionTabs[1]) then FSectionTabs[0] := FSectionTabs[1]+2;
    336       lbxVisits.TabPositions := SectionString;
    337       v := (lbMods.width - LBCheckWidthSpace - (4*MainFontWidth) - ScrollBarWidth);
    338       s := '';
    339       for i := 1 to 20 do
    340       begin
    341         if s <> '' then s := s + ',';
    342         s := s + inttostr(v);
    343         if(v<0) then
    344           dec(v,32)
    345         else
    346           inc(v,32);
    347       end;
    348       lbMods.TabPositions := s;
    349     end;
     341  begin
     342//      inherited;
     343    FSectionTabs[0] := -(lbxVisits.width - LBCheckWidthSpace - MainFontWidth - ScrollBarWidth);
     344    FSectionTabs[1] := -(lbxVisits.width - (6*MainFontWidth) - ScrollBarWidth);
     345    if(FSectionTabs[0] <= FSectionTabs[1]) then FSectionTabs[0] := FSectionTabs[1]+2;
     346    lbxVisits.TabPositions := SectionString;
     347    v := (lbMods.width - LBCheckWidthSpace - (4*MainFontWidth) - ScrollBarWidth);
     348    s := '';
     349    for i := 1 to 20 do
     350    begin
     351      if s <> '' then s := s + ',';
     352      s := s + inttostr(v);
     353      if(v<0) then
     354        dec(v,32)
     355      else
     356        inc(v,32);
     357    end;
     358    lbMods.TabPositions := s;
     359  end;
     360  btnOffset := btnAdd.Width div 7;
     361  padding := btnAdd.Width + (btnOffset * 2);
     362  size := (ClientWidth - padding) div 2;
     363  pnlBottomLeft.Width := size;
     364  pnlBottomRight.Width := size;
     365  btnAdd.Left := size + btnOffset;
     366  btnDelete.Left := size + btnOffset;
     367  btnPrimary.Left := size + btnOffset;
     368  btnOK.top := ClientHeight - btnOK.Height - 4;
     369  btnCancel.top := btnOK.Top;
     370  btnCancel.Left := ClientWidth - btnCancel.Width - 4;
     371  btnOK.Left := btnCancel.Left - btnOK.Width - 4;
     372  size := ClientHeight - btnOK.Height - pnlMiddle.Height - pnlBottom.Height - 8;
     373  pnlTop.Height := size;
    350374end;
    351375
     
    479503end;
    480504
    481 procedure TfrmVisitType.splLeftMoved(Sender: TObject);
    482 begin
    483   inherited;
    484   lblVType.Left := lbxVisits.Left + pnlMain.Left;
    485   FSplitterMove := TRUE;
    486   FormResize(Sender);
    487 end;
    488 
    489 procedure TfrmVisitType.splRightMoved(Sender: TObject);
    490 begin
    491   inherited;
    492   lblMod.Left := lbMods.Left + pnlMain.Left;
    493   FSplitterMove := TRUE;
    494   FormResize(Sender);
    495 end;
    496 
    497505procedure TfrmVisitType.lbModsClickCheck(Sender: TObject; Index: Integer);
    498506var
     
    527535end;
    528536
     537procedure TfrmVisitType.memSCDisplayEnter(Sender: TObject);
     538begin
     539  inherited;
     540  memSCDisplay.SelStart := 0;
     541end;
     542
    529543initialization
     544  SpecifyFormIsNotADialog(TfrmVisitType);
     545
    530546//frmVisitType.CreateProviderList;
    531547
Note: See TracChangeset for help on using the changeset viewer.