I know that i can set custom colors to items when i add them to the list using OnDraw Events but i want to change colors of the items at a certain point after they are already in the list.
Is there a way to do this ?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
To redraw only certain items use the
UpdateItemsmethod. It has two input parameters where you can specify the range of the items to be redrawn. If you are going to redraw only one item, then just specify that one item index as a range.In this example I’m storing the color of the item into the
TListItem.Dataproperty and fading this color in the timer’s event. After changing the value I call theUpdateItemsfunction which force the draw item event to fire. And yes, withoutDoubleBufferedset, it flickers (even when you set the timer’s interval e.g. to 500ms).