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

... The conclusion cannot be an other one than to state that if you are looking for a planning component you have to get the RAC. For your future planning business it is simply a must.
H. de Boer, Staaf Automatisering (see the full case study)
More …

No malware No spam
McAfee Site Report
Web of Trust