- Timestamp:
- May 8, 2015, 7:52:55 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
cprs/branches/HealthSevak-CPRS/CPRS-Chart/Templates/fTemplateDialog.pas
r829 r1693 28 28 procedure FormClose(Sender: TObject; var Action: TCloseAction); 29 29 procedure FormShow(Sender: TObject); 30 procedure FormMouseWheel(Sender: TObject; Shift: TShiftState; 31 WheelDelta: Integer; MousePos: TPoint; var Handled: Boolean); 30 32 private 31 33 FFirstBuild: boolean; … … 71 73 procedure CheckBoilerplate4Fields(SL: TStrings; const CaptionText: string = ''; PreviewMode: boolean = FALSE); overload; 72 74 procedure CheckBoilerplate4Fields(var AText: string; const CaptionText: string = ''; PreviewMode: boolean = FALSE); overload; 75 procedure ShutdownTemplateDialog; 73 76 74 77 var … … 81 84 82 85 {$R *.DFM} 86 87 var 88 uTemplateDialogRunning: boolean = false; 83 89 84 90 const … … 289 295 end; 290 296 297 procedure ShutdownTemplateDialog; 298 begin 299 if uTemplateDialogRunning and assigned(frmTemplateDialog) then 300 begin 301 frmTemplateDialog.Silent := True; 302 frmTemplateDialog.ModalResult := mrCancel; 303 end; 304 end; 305 291 306 procedure CheckBoilerplate4Fields(SL: TStrings; const CaptionText: string = ''; PreviewMode: boolean = FALSE); 292 307 begin … … 689 704 procedure TfrmTemplateDialog.FormCreate(Sender: TObject); 690 705 begin 706 uTemplateDialogRunning := True; 691 707 FFirstBuild := TRUE; 692 708 BuildIdx := TStringList.Create; … … 695 711 FOldHintEvent := Application.OnShowHint; 696 712 Application.OnShowHint := AppShowHint; 697 ResizeAnchoredFormToFont(Self);713 //ResizeAnchoredFormToFont(Self); 698 714 FMaxPnlWidth := FontWidthPixel(sbMain.Font.Handle) * MAX_ENTRY_WIDTH; //AGP change Template Dialog to wrap at 80 instead of 74 699 715 SetFormPosition(Self); 716 ResizeAnchoredFormToFont(Self); 700 717 SizeFormToCancelBtn(); 701 718 end; … … 720 737 Entries.Free; 721 738 BuildIdx.Free; 739 uTemplateDialogRunning := False; 740 end; 741 742 procedure TfrmTemplateDialog.FormMouseWheel(Sender: TObject; Shift: TShiftState; 743 WheelDelta: Integer; MousePos: TPoint; var Handled: Boolean); 744 begin 745 If RectContains(sbMain.BoundsRect, SbMain.ScreenToClient(MousePos)) then 746 begin 747 ScrollControl(sbMain, (WheelDelta > 0)); 748 Handled := True; 749 end; 722 750 end; 723 751
Note:
See TracChangeset
for help on using the changeset viewer.