Avatar of aggressorperfector
aggressorperfector
 asked on

how do i make a transparent (delphi 6) statictext label

how can i make a transparent (delphi 6) statictext label...,

 i need a transparent label of some sort upon which a filename is presented, for a install (setup) program, the problem is that,
my code contains a for-to-do loop in which i try to update the caption of a label (i have tried both Tlabel and statictext labels), the TLabel component will freeze until the loop is finished, and you only see the last filename that was executed in the loop, the statictext however, displays every filename and has no problems having it's caption changed so quickly, but the problem is you cannot make it truely transparent...

can i doublebuffer a TLabel?...
 
 i have tried
  statictext1.color := clTransparentColorValue;

  Deriving the component and exposing the canvas but still cannot use the canvas properly

can use please help me?... (i have paid my $9.99US after all, sorry don't take that insultingly)...

p.s. i do have a few other questions (2-3) to ask but i shall ask them one at a time...
Delphi

Avatar of undefined
Last Comment
kretzschmar

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Imthiyaz_ph

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
kretzschmar

agreed with Imthiyaz_ph
mokule

don't agree :)
maybe better will be

  Label1.Caption := 'New caption'
  Label1.Refresh;

mokule
kretzschmar

?? >don't agree :)

not sure, but would not the refresh also send a paintmessage, which must processed?

All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck
mokule

no, it repaints immediately
kretzschmar

>no, it repaints immediately

well, no delphi on hand yet, so i cannot validate
will do this later
Imthiyaz_ph

mokule is right, Refresh calls the Repaint method of TLabel and its immediate.
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
kretzschmar

i am just thinking about, if a background image is applied,
in this case also the parent have to paint its background new
(erasebkgnd-message/paint-message) before the label itself can paint

its just a thought, but if you both say it works immediately,
then both solutions are right, whereas the refresh method
is less ressource intensiv

i would prefer the application.processmessages-method,
not only for the repaintijng of the label, also to keep the form
accessable (move/resize,etc)

meikl ;-)