How to highlight selected resources.


Implement a hander for the OnDrawResourceName event and set the Color and BkColor used to paint the resource name. This example uses the resource's Tag property, but you could use any criteria to select the colours.

Screen shot
procedure TForm1.RACDrawResourceName(Sender: TObject;
                                     Resource: TssResource;
                                     var Color, BkColor: TColor);
begin
  if Resource.Tag = 1 then begin
    Color := clHighlightText;
    BkColor := clHighlight;
  end;
end;

Note: This event handler can be invoked many times a second while the user is dragging the chart. It is important that it completes quickly in order to maintain a responsive user experience.

What People Say

I just wanted to let you know that I love your component! I find it extensible, easy to use, and the performance is top notch. I even think I understand much of the source. You hit a home run with this one!
Tom Kopeika, Illinois
More …

No malware No spam
McAfee Site Report
Web of Trust