Solved

Color Picker-Flicker

Posted on 2002-05-12
4
287 Views
Last Modified: 2010-05-18
I have 2 controls:

- TrackBar
- TImage

I'm using TImage Canvas and fill it with some colour.
As I move trackbar, the colour should change, let's say the Red changes as the trackbar changes.

The problem is that the image flickers badly. How can I fix it, or, is there another way of doing it?

Graga
0
Comment
Question by:graga
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 34

Accepted Solution

by:
Slick812 earned 100 total points
ID: 7005236
why are you using a TImage? You don't use an Image (Bitmap). Try using a TShape, and change the color of it's brush or use a TPaintBox and change the color of it's canvas (with Rectangle or fillRect). TImage has alot of flickering problems, if you draw on it's canvas. TPaintbox is better to use if u draw on the canvas,, but TShape is good for a solid color.
0
 

Author Comment

by:graga
ID: 7005271
I have changed the component to TPainBox. I'm drawing the shape using LineTo and then fill it using FloodFill (I need to have 2 shapes of different colors.
Flickering is the same as with TImage.
0
 
LVL 34

Expert Comment

by:Slick812
ID: 7005277
can you show the code you use? ?
0
 

Author Comment

by:graga
ID: 7005281
Actually, solved it. When I draw the border once only and then just fill it, there is no flickering.
Thanx
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
Suggested Courses
Course of the Month8 days, 21 hours left to enroll

615 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