Changeset 210 for branches/highdpi/Packages/CevoComponents/ButtonC.pas
- Timestamp:
- May 9, 2020, 4:02:07 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/highdpi/Packages/CevoComponents/ButtonC.pas
r179 r210 4 4 5 5 uses 6 ButtonBase, Classes, Graphics, LCLIntf, LCLType, UDpiControls;6 UDpiControls, ButtonBase, Classes, Graphics, LCLIntf, LCLType, ScreenTools; 7 7 8 8 type … … 11 11 private 12 12 FIndex: Integer; 13 procedure SetIndex( x: Integer);13 procedure SetIndex(Text: Integer); 14 14 published 15 15 property Visible; … … 22 22 procedure Register; 23 23 24 24 25 implementation 25 26 26 27 procedure Register; 27 28 begin 28 RegisterComponents(' Samples', [TButtonC]);29 RegisterComponents('C-evo', [TButtonC]); 29 30 end; 30 31 … … 40 41 with Canvas do 41 42 if FGraphic <> nil then 42 DpiBit Blt(Canvas.Handle, 0, 0, 12, 12, FGraphic.Canvas.Handle,43 169 + 13 * Byte(FDown), 159 + 13 * FIndex , SRCCOPY)43 DpiBitCanvas(Canvas, 0, 0, 12, 12, FGraphic.Canvas, 44 169 + 13 * Byte(FDown), 159 + 13 * FIndex) 44 45 else 45 46 begin 46 47 Brush.Color := $0000FF; 47 48 FrameRect(Rect(0, 0, 12, 12)) 48 end 49 end; 49 50 end; 50 51 51 procedure TButtonC.SetIndex( x: integer);52 procedure TButtonC.SetIndex(Text: integer); 52 53 begin 53 if x<> FIndex then54 if Text <> FIndex then 54 55 begin 55 FIndex := x;56 FIndex := Text; 56 57 Invalidate; 57 58 end;
Note:
See TracChangeset
for help on using the changeset viewer.