Solved

Color Picker-Flicker

Posted on 2002-05-12
4
283 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
  • 2
  • 2
4 Comments
 
LVL 33

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 33

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Delphi 10 Seattle Dataset Actions 5 79
Delphi TcxGrid group footer summary 3 208
Delphi cmd execution 6 55
Delphi 2 47
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…
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…
Hi friends,  in this video  I'll show you how new windows 10 user can learn the using of windows 10. Thank you.

911 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

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now