Changeset 447 for trunk/Packages/CevoComponents/EOTButton.pas
- Timestamp:
- May 19, 2022, 10:39:34 PM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Packages/CevoComponents/EOTButton.pas
r330 r447 19 19 constructor Create(aOwner: TComponent); override; 20 20 destructor Destroy; override; 21 procedure SetButtonIndexFast( x: integer);22 procedure SetBack(ca: TCanvas; x, y: integer);21 procedure SetButtonIndexFast(X: Integer); 22 procedure SetBack(ca: TCanvas; X, Y: Integer); 23 23 private 24 24 FTemplate: TBitmap; 25 FIndex: integer;26 procedure SetIndex( x: integer);25 FIndex: Integer; 26 procedure SetIndex(X: Integer); 27 27 public 28 28 property Template: TBitmap read FTemplate write FTemplate; 29 29 published 30 30 property Visible; 31 property ButtonIndex: integer read FIndex write SetIndex;31 property ButtonIndex: Integer read FIndex write SetIndex; 32 32 property OnClick; 33 33 protected … … 60 60 Back.SetSize(48, 48); 61 61 Back.Canvas.FillRect(0, 0, Back.Width, Back.Height); 62 ShowHint := true;62 ShowHint := True; 63 63 SetBounds(0, 0, 48, 48); 64 64 end; … … 89 89 end; 90 90 91 procedure TEOTButton.SetIndex( x: integer);91 procedure TEOTButton.SetIndex(X: Integer); 92 92 begin 93 if x<> FIndex then begin94 FIndex := x;93 if X <> FIndex then begin 94 FIndex := X; 95 95 Invalidate; 96 96 end; 97 97 end; 98 98 99 procedure TEOTButton.SetButtonIndexFast( x: integer);99 procedure TEOTButton.SetButtonIndexFast(X: Integer); 100 100 begin 101 if Visible and ( x<> FIndex) then begin102 FIndex := x;101 if Visible and (X <> FIndex) then begin 102 FIndex := X; 103 103 try 104 104 Paint; … … 108 108 end; 109 109 110 procedure TEOTButton.SetBack(ca: TCanvas; x, y: integer);110 procedure TEOTButton.SetBack(ca: TCanvas; X, Y: Integer); 111 111 begin 112 BitBltCanvas(Back.Canvas, 0, 0, 48, 48, ca, x, y);112 BitBltCanvas(Back.Canvas, 0, 0, 48, 48, ca, X, Y); 113 113 end; 114 114
Note:
See TracChangeset
for help on using the changeset viewer.