How to change an allocation's style and colour.


One you have a reference to an allocation, set the Style and Color properties.

var
  r: TssResource;
  a: TssResourceAllocation;
begin
  r := RAC.FindResource('My Resource');
  if Assigned(r) and (r.Count > 0) then begin
    // use the last allocation for this example
    a := r.Allocations[r.Count - 1];
    a.BeginUpdate;
    try
      a.Color := clYellow;
      a.Style := rsRoundRect;
    finally
      a.EndUpdate;
    end;
  end;
end;
What People Say

Great component, I'm searching for this component for a long while.
Marco Dissel, Broekhuis Noord Nederland
More …

No malware No spam
McAfee Site Report
Web of Trust