The TssResourceAllocationChart uses four classes to represent various components:

TssResource

TssResource represents a single resource that can be allocated. There can be none, or many, resources on a TssResourceAllocationChart.
AnyObject PropertyPublic TObject
A reference to any TObject that you like. The AnyObject property is provided for the convenience of storing additional information for special needs in an application. If the OwnsAnyObject property is true, the object will be freed when the resource is destroyed.
Allocations PropertyPublicRead Only [indx: integer]: TssResourceAllocation
An array giving access to the allocations for the resource.
Color PropertyPublic TColor
The default colour for allocations of this resource.
Count PropertyPublicRead Only integer
The number of allocations for this resource.
DisplayRect PropertyPublic TRect
The rectangle used to display allocations for this resource.
Name PropertyPublic string
The name of the resource.
OwnsAnyObject PropertyPublic boolean
Whether the object referenced by the AnyObject property is owned by this resource. If the object is owned, it is freed when the resource is destroyed.
ResourceChart PropertyPublicRead Only TssCustomResourceAllocationChart
The chart this resource belongs to.
Style PropertyPublic TssResourceDisplayStyle
The default display style for allocations of this resource.
Tag PropertyPublic longint
Tag has no predefined meaning. The Tag property is provided for the convenience of storing additional integer value or pointer information for special needs in an application.
AddSlot FunctionPublic (StartAt, EndAt: TDateTime): TssResourceAllocation
Adds a new allocation slot between the times specified.
BeginUpdate ProcedurePublic ()
Starts buffering updates. One call to EndUpdate should be called for each call to BeginUpdate.
Clear ProcedurePublic ()
Deletes all allocations for this resource.
EndUpdate ProcedurePublic ()
Stops buffering updates. One call to EndUpdate should be called for each call to BeginUpdate.
FindFreeSlot FunctionPublic (MinDateTime, MaxDateTime, Span: TDateTime; Increment: TDateTime = -1): TDateTime
Finds the first free slot with the specified span, between the two date/times.
FindSlotAt ProcedurePublic (DateTime: TDateTime): TssResourceAllocation
Returns the allocation at a particular time, or nil if none.
FindSlotFromPoint FunctionPublic (point: TPoint): TssResourceAllocation
Finds the allocation displayed at the specified position. Returns nil if none.
IndexOf FunctionPublic (Slot: TssResourceAllocation): integer
Returns the index of a particular allocation, or -1 if the allocation is not found.
IsSlotFree FunctionPublic (StartAt, EndAt: TDateTime; IgnoreSlot: TssResourceAllocation = nil): boolean
Determines whether a particular allocation slot is free. Can optionally ignore an allocation when checking.
SortAllocations FunctionPublic ()
Sorts the allocations into increasing date/time order.

To delete a TssResource, simply call its Free method. This will automatically delete it from the TssResourceAllocationChart.

What People Say

I just wanted to let you know that I love your component! I find it extensible, easy to use, and the performance is top notch. I even think I understand much of the source. You hit a home run with this one!
Tom Kopeika, Illinois
More …

No malware No spam
McAfee Site Report
Web of Trust