Link to home
Start Free TrialLog in
Avatar of peterharris
peterharrisFlag for United Kingdom of Great Britain and Northern Ireland

asked on

XPManifest makes controls transparent

I have previously found the answer to this but lost it and despite extensive googling and EE search I cannot find it again!

It is a problem with Delphi 7 and XPManifest which causes all Controls to appear transparent when compiled.   I want to set a Tlabel with a background color but as soon as I add the XPManifest component the background color disappears.

The solution I found previously involved altering some property of the label at runtime

A link to a solution was posted on EE by DragonSlayer but the link no longer works

##############################
 Here's the solution, and the cause:
http://support.soft-gems.net/phpBB2/viewtopic.php?t=506


DragonSlayer.
##############################

Can anyone point me in the right direction

Thanks


ASKER CERTIFIED SOLUTION
Avatar of Mike Littlewood
Mike Littlewood
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of peterharris

ASKER

Thanks for the suggestion but I am sure the solution I used previously was simpler than that.  

Peter
I have found the answer to my own question.   There appear to be 2 different problems with different solutions.

For a TPanel component this works:

procedure TForm1.FormCreate(Sender: TObject);
begin
  panel1.ControlStyle := panel1.ControlStyle - [csParentBackground];
end;

However it doesnt work for a TLabel but this does  (it may be what you were suggesting)

Set Label.parentcolor = False
Set Label.Color = clwhatever

If you compile and run now it still doesnt show the label color.

However,  if you set Label.Transparent to True and then back to False and recompile it works OK

Anyone got any idea what's going on?

Peter
Yes its the same sort of problem I believe.
I read some notes on the subject a while back and I have answered previous questions on along the same lines.
As far as I remember it is just a bug with TXPManifest which Borland wrote an article on.