Autor Beitrag
Borlox
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 191

Win XP
Delphi 6 Enterprise
BeitragVerfasst: Sa 04.01.03 22:17 
Hi Leute,

wie kann ich die Farbe eines Canvas mit Hexzahlen ändern? Ich weiß, dass ich sie mit dem folgenden Code ändern kann:
ausblenden Quelltext
1:
DXDraw1.Surface.Canvas.Font.Color:=???;					

Aber ich weiß nicht wie ich das mit der Farbe mache! Ich möchte keine Standartfarben wie clgray oder so benutzen, sondern Hexzahlen!

Danke

p.s. Sorry, wenn das hier die falsche Kategorie ist, aber ich wusste nicht in welche das gehört!

(04.01. 23:34 Tino) Code-Tag hinzugefügt.
torstenheinze
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 461



BeitragVerfasst: Sa 04.01.03 22:34 
gib einfach die hexzahlen an
oder rgb farbcode
Borlox Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 191

Win XP
Delphi 6 Enterprise
BeitragVerfasst: Sa 04.01.03 22:50 
Titel: Danke
Danke, aber der Fehler lag darin, dass man vor dem Hexcode noch ein $ brauch! Und das habe ich gerade eben durch stundenlanges rumprobieren herausgefunden!
torstenheinze
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 461



BeitragVerfasst: Sa 04.01.03 22:54 
weißt du wie du das hättest rauskriegen können:
andere mal die farbe der form1 mit hielfe des colordialogs über der objectinspector. aber nimm eine ungebräuchliche farbe (also nicht clgray, usw),
wenn du dann auf den farbwert im obj-ins. schaust, dann siehst du da vor dem wert ein $
Borlox Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 191

Win XP
Delphi 6 Enterprise
BeitragVerfasst: So 05.01.03 00:12 
Titel: ?
Ich habe auch bei so etwas geguckt! Nämlich bei einer anderen Komponente, aber da konnte man nur die Farbe in die Standartfarben ändern!
torstenheinze
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 461



BeitragVerfasst: So 05.01.03 00:28 
achso, aber jetzt geht es ja!! :wink: