Ignore:
Timestamp:
Aug 8, 2008, 8:34:55 PM (16 years ago)
Author:
Kevin Toppenberg
Message:

Added Colorful Tabs, Changable Tab positions, Demographics translation enabled

Location:
cprs/branches/tmg-cprs/CPRS-Chart/Options
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • cprs/branches/tmg-cprs/CPRS-Chart/Options/fOptions.dfm

    r453 r473  
    8686      Height = 323
    8787      HelpContext = 9999
    88       ActivePage = tsLanguage
     88      ActivePage = tsCoverSheet
    8989      Align = alClient
    9090      TabOrder = 0
     
    17531753  end
    17541754  object DKLanguageController1: TDKLanguageController
    1755     Left = 136
    1756     Top = 240
     1755    Left = 80
     1756    Top = 280
    17571757    LangData = {
    17581758      0A0066726D4F7074696F6E73010200000001000000070043617074696F6E0200
  • cprs/branches/tmg-cprs/CPRS-Chart/Options/fOptionsOther.dfm

    r453 r473  
    11object frmOptionsOther: TfrmOptionsOther
    2   Left = 341
    3   Top = 96
     2  Left = 298
     3  Top = 189
    44  Hint = 'Use system default settings'
    55  HelpContext = 9110
     
    99  Caption = 'Other Parameters'
    1010  ClientHeight = 436
    11   ClientWidth = 329
     11  ClientWidth = 391
    1212  Color = clBtnFace
    1313  Font.Charset = DEFAULT_CHARSET
     
    2626  object lblMedsTab: TLabel
    2727    Left = 7
    28     Top = 121
    29     Width = 135
    30     Height = 26
     28    Top = 168
     29    Width = 178
     30    Height = 17
    3131    Hint = 'Set date ranges for displaying medication orders on Meds tab.'
    3232    Caption = 'Set date range for Meds tab display:'
     
    4444  object Bevel1: TBevel
    4545    Left = 1
    46     Top = 110
    47     Width = 327
    48     Height = 2
     46    Top = 150
     47    Width = 392
     48    Height = 3
    4949  end
    5050  object lblEncAppts: TLabel
     
    6262    Left = 1
    6363    Top = 256
    64     Width = 327
     64    Width = 392
    6565    Height = 2
     66  end
     67  object Label1: TLabel
     68    Left = 232
     69    Top = 27
     70    Width = 106
     71    Height = 13
     72    Caption = 'Select Tab Positioning'
     73  end
     74  object Label2: TLabel
     75    Left = 8
     76    Top = 104
     77    Width = 83
     78    Height = 13
     79    Caption = 'Adjust Tab Colors'
     80  end
     81  object Label3: TLabel
     82    Left = 232
     83    Top = 104
     84    Width = 138
     85    Height = 13
     86    Caption = '(Click box below to edit color)'
    6687  end
    6788  object pnlBottom: TPanel
    6889    Left = 0
    6990    Top = 403
    70     Width = 329
     91    Width = 391
    7192    Height = 33
    7293    HelpContext = 9110
     
    7899      Left = 0
    79100      Top = 0
    80       Width = 329
     101      Width = 391
    81102      Height = 2
    82103      Align = alTop
     
    108129  object stStart: TStaticText
    109130    Left = 7
    110     Top = 151
     131    Top = 191
    111132    Width = 55
    112133    Height = 17
     
    115136  end
    116137  object stStop: TStaticText
    117     Left = 7
    118     Top = 207
     138    Left = 199
     139    Top = 191
    119140    Width = 55
    120141    Height = 17
     
    124145  object dtStart: TORDateBox
    125146    Left = 7
    126     Top = 170
    127     Width = 187
     147    Top = 210
     148    Width = 178
    128149    Height = 21
    129150    TabOrder = 4
     
    135156  end
    136157  object dtStop: TORDateBox
    137     Left = 8
    138     Top = 225
     158    Left = 200
     159    Top = 209
    139160    Width = 186
    140161    Height = 21
     
    148169    Left = 8
    149170    Top = 6
    150     Width = 52
     171    Width = 62
    151172    Height = 17
    152173    Caption = 'Chart tabs'
     174    Font.Charset = DEFAULT_CHARSET
     175    Font.Color = clWindowText
     176    Font.Height = -11
     177    Font.Name = 'MS Sans Serif'
     178    Font.Style = [fsBold]
     179    ParentFont = False
    153180    TabOrder = 0
    154181  end
    155182  object cboTab: TORComboBox
    156183    Left = 8
    157     Top = 51
     184    Top = 43
    158185    Width = 217
    159186    Height = 21
     
    180207  object chkLastTab: TCheckBox
    181208    Left = 8
    182     Top = 82
    183     Width = 312
     209    Top = 74
     210    Width = 233
    184211    Height = 21
    185212    HelpContext = 9112
     
    313340    OnClick = btnEncDefaultsClick
    314341  end
     342  object TabPositionComboBox: TComboBox
     343    Left = 232
     344    Top = 43
     345    Width = 145
     346    Height = 21
     347    ItemHeight = 13
     348    ItemIndex = 0
     349    TabOrder = 23
     350    Text = 'Tabs on BOTTOM'
     351    OnChange = TabPositionComboBoxChange
     352    Items.Strings = (
     353      'Tabs on BOTTOM'
     354      'Tabs on TOP'
     355      'Tabs on LEFT'
     356      'Tabs on RIGHT')
     357  end
     358  object pnlShowColor: TPanel
     359    Left = 232
     360    Top = 120
     361    Width = 145
     362    Height = 22
     363    BevelInner = bvLowered
     364    TabOrder = 24
     365    OnClick = pnlShowColorClick
     366  end
     367  object cboTabColors: TComboBox
     368    Left = 8
     369    Top = 120
     370    Width = 217
     371    Height = 21
     372    ItemHeight = 13
     373    ItemIndex = 0
     374    TabOrder = 25
     375    Text = ' '
     376    OnChange = cboTabColorsChange
     377    Items.Strings = (
     378      ' ')
     379  end
    315380  object DKLanguageController1: TDKLanguageController
    316381    Left = 152
    317     Top = 224
     382    Top = 8
    318383    LangData = {
    319384      0F0066726D4F7074696F6E734F74686572010300000002000000070043617074
    320       696F6E03000000080048656C7046696C6501000000040048696E74011B000000
     385      696F6E03000000080048656C7046696C6501000000040048696E740122000000
    321386      0A006C626C4D656473546162010200000005000000070043617074696F6E0400
    322387      0000040048696E740006006C626C546162010100000006000000070043617074
     
    342407      6E000E00737453746F70456E6341707074730101000000190000000700436170
    343408      74696F6E000E0062746E456E6344656661756C747301010000001A0000000700
    344       43617074696F6E00}
     409      43617074696F6E001300546162506F736974696F6E436F6D626F426F78010200
     410      00001C00000005004974656D731B0000000400546578740006004C6162656C31
     411      01010000001D000000070043617074696F6E0006004C6162656C320101000000
     412      1E000000070043617074696F6E000C00706E6C53686F77436F6C6F7200000B00
     413      436F6C6F724469616C6F67000006004C6162656C3301010000001F0000000700
     414      43617074696F6E000C0063626F546162436F6C6F72730000}
     415  end
     416  object ColorDialog: TColorDialog
     417    Left = 192
     418    Top = 8
    345419  end
    346420end
  • cprs/branches/tmg-cprs/CPRS-Chart/Options/fOptionsOther.pas

    r453 r473  
    3939    btnEncDefaults: TButton;
    4040    DKLanguageController1: TDKLanguageController;
     41    TabPositionComboBox: TComboBox;
     42    Label1: TLabel;
     43    Label2: TLabel;
     44    pnlShowColor: TPanel;
     45    ColorDialog: TColorDialog;
     46    Label3: TLabel;
     47    cboTabColors: TComboBox;
    4148    procedure FormShow(Sender: TObject);
    4249    procedure btnOKClick(Sender: TObject);
     
    5057    procedure txtEncStopExit(Sender: TObject);
    5158    procedure btnEncDefaultsClick(Sender: TObject);
     59    procedure TabPositionComboBoxChange(Sender: TObject);
     60    procedure cboTabColorsChange(Sender: TObject);
     61    procedure pnlShowColorClick(Sender: TObject);
    5262  private
    5363    { Private declarations }
     
    6676  ENC_MAX_LIMIT = 999;
    6777
    68  
     78
    6979procedure DialogOptionsOther(topvalue, leftvalue, fontsize: integer; var actiontype: Integer);
     80procedure SetTabPosition(Position : TTabPosition);
    7081
    7182implementation
     
    7485
    7586uses
    76   rOptions, uOptions, rCore, rSurgery, uConst, fMeds;
     87  rOptions, uOptions, rCore, rSurgery, uConst, fMeds, fFrame;
    7788
    7889procedure DialogOptionsOther(topvalue, leftvalue, fontsize: integer; var actiontype: Integer);
     
    110121  values, tab: string;
    111122begin
    112   cboTab.Items.Assign(rpcGetOtherTabs);
     123  cboTabColors.Items.Assign(uTabColorsList);  //kt added8808
     124  cboTabColors.ItemIndex := 0;      //kt
     125  cboTab.Items.Assign(rpcGetOtherTabs);   //kt
     126 cboTabColorsChange(nil);   //kt
    113127//if (cboTab.Items.IndexOf('Surgery') > -1) and (not ShowSurgeryTab) then  <-- original line.  //kt 8/8/2007
    114128  if (cboTab.Items.IndexOf(DKLangConstW('fOptionsOther_Surgery')) > -1) and (not ShowSurgeryTab) then //kt added 8/8/2007
     
    282296end;
    283297
     298procedure TfrmOptionsOther.TabPositionComboBoxChange(Sender: TObject);
     299//kt added 8/8/08
     300begin
     301  Case TabPositionComboBox.ItemIndex of
     302    0 : SetTabPosition(tpBottom);
     303    1 : SetTabPosition(tpTop);
     304    2 : SetTabPosition(tpLeft);
     305    3 : SetTabPosition(tpRight);
     306  end; {case}
     307end;
     308
     309procedure SetTabPosition(Position : TTabPosition);
     310//kt added 8/8/08
     311begin
     312  frmFrame.tabPage.TabPosition := Position;
     313  Case Position of
     314    tpBottom : frmFrame.tabPage.Align := alBottom;
     315    tpTop: frmFrame.tabPage.Align := alTop;
     316    tpLeft: frmFrame.tabPage.Align := alLeft;
     317    tpRight : frmFrame.tabPage.Align := alRight;
     318  end; {case}
     319end;
     320
     321
     322procedure TfrmOptionsOther.cboTabColorsChange(Sender: TObject);
     323var color : TColor;
     324    selIndex : integer;
     325begin
     326  selIndex := cboTabColors.ItemIndex;
     327  if selIndex < 0 then exit;
     328  color := TColor(cboTabColors.Items.Objects[selIndex]);
     329  pnlShowColor.Color := color;
     330end;
     331
     332procedure TfrmOptionsOther.pnlShowColorClick(Sender: TObject);
     333//kt added 8/8/08
     334var s : string;
     335    selIndex : integer;
     336begin
     337  if ColorDialog.Execute then begin
     338    pnlShowColor.Color := ColorDialog.Color;
     339    selIndex := cboTabColors.ItemIndex;
     340    if selIndex < 0 then exit;
     341    cboTabColors.Items.Objects[selIndex] := pointer(ColorDialog.Color);
     342    uTabColorsList.Objects[selIndex] := pointer(ColorDialog.Color);
     343  end;
     344end;
     345
    284346end.
Note: See TracChangeset for help on using the changeset viewer.