source: trunk/Packages/DpiControls/Dpi.Spin.pas

Last change on this file was 468, checked in by chronos, 8 months ago
  • Added: High DPI support integrated into trunk branch. It can be enabled by adding DPI define to compiler parameters for main project and packages.
File size: 727 bytes
Line 
1unit Dpi.Spin;
2
3interface
4
5uses
6 Classes, SysUtils, Spin, Dpi.Controls;
7
8type
9 { TDpiSpinEdit }
10
11 TDpiSpinEdit = class(TWinControl)
12 private
13 NativeSpinEdit: TSpinEdit;
14 public
15 function GetNativeSpinEdit: TSpinEdit;
16 constructor Create(TheOwner: TComponent); override;
17 destructor Destroy; override;
18 end;
19
20
21implementation
22
23{ TDpiSpinEdit }
24
25function TDpiSpinEdit.GetNativeSpinEdit: TSpinEdit;
26begin
27 if not Assigned(NativeSpinEdit) then NativeSpinEdit := TSpinEdit.Create(nil);
28 Result := NativeSpinEdit;
29end;
30
31constructor TDpiSpinEdit.Create(TheOwner: TComponent);
32begin
33 inherited Create(TheOwner);
34end;
35
36destructor TDpiSpinEdit.Destroy;
37begin
38 FreeAndNil(NativeSpinEdit);
39 inherited;
40end;
41
42
43end.
44
Note: See TracBrowser for help on using the repository browser.