How to change a resource's style and colour.


Note: resources aren't actually displayed with any style or in any colour, but the resource's Style and Color properties are the default style and colour for allocations for that resource.

var
  r: TssResource;
begin
  r := RAC.FindResource('My Resource');
  if Assigned(r) then begin
    r.BeginUpdate;
    try
      r.Color := clBlue;
      r.Style := rsLine;
    finally
      r.EndUpdate;
    end;
  end;
end;

Any allocations for this resource whose colour and style matched the resource's old colour and style values, are also set to use the new colour and style.

What People Say

This is a great component. I've been using it for a year. It's well written, performance is top notch, and the couple of time I've asked for support, I've gotten it right away from the author.
Steve McForest
More …

No malware No spam
McAfee Site Report
Web of Trust