Delphi-PRAXiS

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/)
-   -   FMX TEDIT Hintergrundfarbe wechseln (https://www.delphipraxis.net/181349-fmx-tedit-hintergrundfarbe-wechseln.html)

arnof 8. Aug 2014 08:39

FMX TEDIT Hintergrundfarbe wechseln
 
Ich habe mal eine echte Beginner Frage (XE6):

FMX TEDIT, wie wechselt man denn dort die Hintergrundfarbe ?

.Color gibt es ja nicht.


Auch ein anderes Beispiel was ich gefunden habe:

Delphi-Quellcode:
procedure SetEditControlColor(AEditControl: TCustomEdit; AColor: TAlphaColor);
 var
  T: TFmxObject;
begin
  if AEditControl = nil then  Exit;
  T := AEditControl.FindStyleResource('background');
  if (T <> nil) and (T is TRectangle) then
     if TRectangle(T).Fill <> nil then
        TRectangle(T).Fill.Color := AColor;
  AEditControl.Repaint;
end;
geht nicht da T <> TRectangle ist :pale:

T ist hier ein TActiveStyleObject ???


Alle Zeitangaben in WEZ +1. Es ist jetzt 14:36 Uhr.

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