Autor Beitrag
mg4all
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 62

WIN 7
Delphi 7 Enterprise
BeitragVerfasst: Do 26.06.08 22:30 
Hallo Leute.

Ich habe ein Problem mit einem Label. Ich möchte die Hintergrundfarbe ändern.

ausblenden Delphi-Quelltext
1:
Label1.color := clred;					


Soweit kein Problem, wenn ich aber das XPManifest dazusetze, kann ich zwar noch die Fontfarbe ändern aber nicht mehr den Hintergrund.

Kann mir da jemand helfen ?

THX

_________________
Wer nicht fragt hat schon verloren !!!
delfiphan
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 2684
Erhaltene Danke: 32



BeitragVerfasst: Do 26.06.08 22:37 
In neueren Delphi-Versionen gibt es die Eigenschaft Transparent. In Delphi 7 gibt's die möglicherweise nicht, aber das Manifest gab's dort wohl auch noch nicht (?).
mg4all Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 62

WIN 7
Delphi 7 Enterprise
BeitragVerfasst: Do 26.06.08 22:44 
Transparent ist mir schon klar, aber ich möchte ja die Farbe des Labels ändern.

_________________
Wer nicht fragt hat schon verloren !!!
delfiphan
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 2684
Erhaltene Danke: 32



BeitragVerfasst: Do 26.06.08 22:46 
Transparent auf False und dann den Color setzen. Falls das mit dem Manifest nicht funktioniert, dann ist das eine Inkompatibilität, die mittlerweile geflickt ist. Dann musst du (für deine Delphi-Version) auf eine andere Komponente ausweichen oder dir selbst eine bauen, die funktioniert. Das dürfte keine Hexerei sein: Einfach Paint; ableiten und FillRect(ClientRect) mit entsprechender Farbe.
mg4all Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 62

WIN 7
Delphi 7 Enterprise
BeitragVerfasst: Do 26.06.08 22:52 
Ja ist schon klar, Transparent ist auf False. Hab auch schon versucht auf den Canvas zu malen, funzt aber auch nicht.

_________________
Wer nicht fragt hat schon verloren !!!
mg4all Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 62

WIN 7
Delphi 7 Enterprise
BeitragVerfasst: Do 26.06.08 23:00 
OK Problem gelöst. Ich habe Transparent 1 x auf True gestellt und gestartet und danach 1 x auf False und siehe da, die Farbe war da !!!

_________________
Wer nicht fragt hat schon verloren !!!