- Timestamp:
- Aug 8, 2008, 8:34:55 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
cprs/branches/tmg-cprs/CPRS-Chart/Options/fOptionsOther.pas
r453 r473 39 39 btnEncDefaults: TButton; 40 40 DKLanguageController1: TDKLanguageController; 41 TabPositionComboBox: TComboBox; 42 Label1: TLabel; 43 Label2: TLabel; 44 pnlShowColor: TPanel; 45 ColorDialog: TColorDialog; 46 Label3: TLabel; 47 cboTabColors: TComboBox; 41 48 procedure FormShow(Sender: TObject); 42 49 procedure btnOKClick(Sender: TObject); … … 50 57 procedure txtEncStopExit(Sender: TObject); 51 58 procedure btnEncDefaultsClick(Sender: TObject); 59 procedure TabPositionComboBoxChange(Sender: TObject); 60 procedure cboTabColorsChange(Sender: TObject); 61 procedure pnlShowColorClick(Sender: TObject); 52 62 private 53 63 { Private declarations } … … 66 76 ENC_MAX_LIMIT = 999; 67 77 68 78 69 79 procedure DialogOptionsOther(topvalue, leftvalue, fontsize: integer; var actiontype: Integer); 80 procedure SetTabPosition(Position : TTabPosition); 70 81 71 82 implementation … … 74 85 75 86 uses 76 rOptions, uOptions, rCore, rSurgery, uConst, fMeds ;87 rOptions, uOptions, rCore, rSurgery, uConst, fMeds, fFrame; 77 88 78 89 procedure DialogOptionsOther(topvalue, leftvalue, fontsize: integer; var actiontype: Integer); … … 110 121 values, tab: string; 111 122 begin 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 113 127 //if (cboTab.Items.IndexOf('Surgery') > -1) and (not ShowSurgeryTab) then <-- original line. //kt 8/8/2007 114 128 if (cboTab.Items.IndexOf(DKLangConstW('fOptionsOther_Surgery')) > -1) and (not ShowSurgeryTab) then //kt added 8/8/2007 … … 282 296 end; 283 297 298 procedure TfrmOptionsOther.TabPositionComboBoxChange(Sender: TObject); 299 //kt added 8/8/08 300 begin 301 Case TabPositionComboBox.ItemIndex of 302 0 : SetTabPosition(tpBottom); 303 1 : SetTabPosition(tpTop); 304 2 : SetTabPosition(tpLeft); 305 3 : SetTabPosition(tpRight); 306 end; {case} 307 end; 308 309 procedure SetTabPosition(Position : TTabPosition); 310 //kt added 8/8/08 311 begin 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} 319 end; 320 321 322 procedure TfrmOptionsOther.cboTabColorsChange(Sender: TObject); 323 var color : TColor; 324 selIndex : integer; 325 begin 326 selIndex := cboTabColors.ItemIndex; 327 if selIndex < 0 then exit; 328 color := TColor(cboTabColors.Items.Objects[selIndex]); 329 pnlShowColor.Color := color; 330 end; 331 332 procedure TfrmOptionsOther.pnlShowColorClick(Sender: TObject); 333 //kt added 8/8/08 334 var s : string; 335 selIndex : integer; 336 begin 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; 344 end; 345 284 346 end.
Note:
See TracChangeset
for help on using the changeset viewer.