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.