Delphi-PRAXiS
Seite 2 von 2     12   

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   GUI-Design mit VCL / FireMonkey / Common Controls (https://www.delphipraxis.net/18-gui-design-mit-vcl-firemonkey-common-controls/)
-   -   Delphi Welche Windows-Events zum Zeichnen eines Buttons (https://www.delphipraxis.net/58586-welche-windows-events-zum-zeichnen-eines-buttons.html)

sh17 20. Dez 2005 08:21

Re: Welche Windows-Events zum Zeichnen eines Buttons
 
Hab das Problem gefunden. Der ThemeManager muss auf dem Formular liegen, dann gehts.

Allerdings sollte in DefaultDrawBackground folgendes entfernt werden:

Delphi-Quellcode:
    { Note that changing the background color with active
      visual styles will *NOT* look good in most cases!
    }
    if (Brush.Color <> clBtnFace) and (Brush.Color <> clNone) then
    begin
      InflateRect(Rect, -1, -1);
      FillRect(Canvas.Handle, Rect, Brush.Handle);
      InflateRect(Rect, 1, 1);
    end;
und folgendes abgeändert:

Delphi-Quellcode:
    if Brush.Color <> clNone then
      FillRect(Canvas.Handle, Rect, Brush.Handle);
in

Delphi-Quellcode:
  FillRect(Canvas.Handle, Rect, GetSysColorBrush(COLOR_BTNFACE));Rect, Brush.Handle);
So wird das "normale" Verhalten von Windows erzeugt.

Ich nutze teilweise andersfarbige Hintergründe.


Alle Zeitangaben in WEZ +1. Es ist jetzt 14:14 Uhr.
Seite 2 von 2     12   

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz