Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

How to do TStaticText transparent?

Posted on 1999-01-25
5
Medium Priority
?
781 Views
Last Modified: 2012-06-27
Hello All!

Help me please. I have problem. I needed to create moving on the timer, textual component. I can not use TLabel, because it blinks during drawing. TStaticText does not blink, but it not transparent. Adjust StaticText.ComponentStyle in not csOpaque does not help.
Prompt me pls, how do I decide this problem?

Thank, Nick G.
0
Comment
Question by:inkom
5 Comments
 
LVL 13

Accepted Solution

by:
Epsylon earned 150 total points
ID: 1363207
Double buffer it! Create 2 TLabels on the the same positon. When an update has to be done update the invisible one with new text, then make it visible and make the old one invisible. So at every update you switch between the 2 TLabels.

Give it your best shot and let me know if it works!
0
 
LVL 12

Expert Comment

by:rwilson032697
ID: 1363208
Or try this (cleaner than having two of them...

SetWindowLong(StaticText1.Handle, GWL_EXSTYLE,
                        GetWindowLong(StaticText1.Handle, GWL_EXSTYLE)                                                OR WS_EX_TRANSPARENT);

Cheers,

Raymond.

0
 
LVL 13

Expert Comment

by:Epsylon
ID: 1363209
Maybe you should use this too:

SendMessage(form1.handle, WM_SETREDRAW, 0, 0); to lock redraw
SendMessage(form1.handle, WM_SETREDRAW, 1, 0); to unlock redraw

Or try to write directly with form1.canvas.textout and change form1.canvas.textflags to your needs.
0
 
LVL 10

Expert Comment

by:viktornet
ID: 1363210
I think there is a transparetn property for the TStaticText,..
0
 

Author Comment

by:inkom
ID: 1363211
Adjusted points to 150
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
Screencast - Getting to Know the Pipeline
Suggested Courses
Course of the Month21 days, 5 hours left to enroll

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question