Changeset 315 for trunk/Packages/CevoComponents/ButtonA.pas
- Timestamp:
- Mar 18, 2021, 10:58:28 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Packages/CevoComponents/ButtonA.pas
r290 r315 4 4 5 5 uses 6 ButtonBase, Classes, Graphics, LCLIntf, LCLType, ScreenTools ;6 ButtonBase, Classes, Graphics, LCLIntf, LCLType, ScreenTools, Types; 7 7 8 8 type … … 41 41 42 42 procedure TButtonA.Paint; 43 var 44 TextSize: TSize; 43 45 begin 44 46 with Canvas do 45 if FGraphic <> nil then 46 begin 47 if FGraphic <> nil then begin 47 48 BitBltCanvas(Canvas, 0, 0, 100, 25, Graphic.Canvas, 195, 48 49 243 + 26 * Byte(Down)); 49 50 Canvas.Brush.Style := bsClear; 50 Textout(50 - (TextWidth(FCaption) + 1) div 2, 12 - textheight(FCaption) 51 div 2, FCaption); 52 end 53 else 54 begin 51 TextSize := TextExtent(FCaption); 52 TextOut(50 - (TextSize.Width + 1) div 2, 53 12 - TextSize.Height div 2, FCaption); 54 end else begin 55 55 Brush.Color := $0000FF; 56 56 FrameRect(Rect(0, 0, 100, 25))
Note:
See TracChangeset
for help on using the changeset viewer.