How to highlight selected allocations.


Implement a handler for the OnAllocationDraw event, and set the attributes of the pen and brush used to paint the allocation. This example only sets the pen and brush for selected allocations, but you could set them for any allocations you need.

procedure TForm1.RACAllocationDraw(Sender: TObject;
                                   Resource: TssResource;
                                   Allocation: TssResourceAllocation;
                                   Pen: TPen;
                                   Brush: TBrush);
begin
  if Allocation.Selected then begin
    Pen.Color := clRed;
    Pen.Width := 2;
    // draw selected allocations using a cross-hatched brush
    Brush.Style := bsDiagCross;
    // or draw selected allocations using a bitmap brush
    // Brush.Bitmap := FSelectedBitmap;
  end;
end;
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