Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Sonstige Fragen zu Delphi (https://www.delphipraxis.net/19-sonstige-fragen-zu-delphi/)
-   -   Delphi [Farben] HEX (HTML) zu DelphiCode ??? (https://www.delphipraxis.net/13462-%5Bfarben%5D-hex-html-zu-delphicode.html)

shareholder 18. Dez 2003 22:51


[Farben] HEX (HTML) zu DelphiCode ???
 
hallo, gibt es denn keine funktion, die einen String in das TColor - Format umwandeln kann ?

habe folgendes gelesen:
http://www.delphi-treff.de/content/e...ex.php4?id=313

dort steht aber nix weiter zu :(
hoffe mir kann jmd. helfen.

DANKE

trifid 18. Dez 2003 23:08

Re: [Farben] HEX (HTML) zu DelphiCode ???
 
Hallo,

was verstehts Du nicht - das funktioniert doch - und sogar mit beispiel

s := '123456';
Edit1.Color := TColor (StrToInt (s));
oder
s := '$00408000';
Edit1.Color := TColor (StrToInt (s));

Luckie 18. Dez 2003 23:22

Re: [Farben] HEX (HTML) zu DelphiCode ???
 
Zitat:

Zitat von shareholder
dort steht aber nix weiter zu :(

Was soll denn das heißen? da ist der komplette quelltext abgedruckt inklusive eines Beispielaufrufes.

shareholder 18. Dez 2003 23:59

Re: [Farben] HEX (HTML) zu DelphiCode ???
 
Code:
function ConvertToDelphiColor(Html : string) : TColor;
auweia, es wird TColor zurückgegeben.
Hatte keine Funktion geschrieben, sondern den Body einfach in meinen Code geschrieben. :shock:

Sorry :roll: :stupid:


Alle Zeitangaben in WEZ +1. Es ist jetzt 15:28 Uhr.

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