The TssResourceAllocationChart uses four classes to represent various components:
- TssResourceAllocationChart: represents the whole chart.
- TssResource: represents a single resource that can be allocated.
- TssResourceAllocation: represents a single allocation of a single resource.
- TssResourceAllocationChartAppearance: properties the control the appearance of the chart.
- Various types used by the chart.
TssResourceAllocationChart
TssResourceAllocationChart represents the whole chart.AnyObject | ![]() ![]() |
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 chart is destroyed. | ||
Bitmap | ![]() ![]() ![]() |
TBitmap |
The off-screen bitmap containing the chart image. | ||
ChartAppearance | ![]() ![]() |
TssResourceAllocationChartAppearance |
A member holding properties that control the appearance of the chart. | ||
Count | ![]() ![]() ![]() |
integer |
The number of resources. | ||
EndAt | ![]() ![]() |
TDateTime |
The end date/time of the chart. | ||
FindAvailableResources | ![]() ![]() |
(StartDateTime, EndDateTime: TDateTime; List: TList): integer; |
Populates a list with resources that have availability for the specified period. | ||
FindAvailableSlot | ![]() ![]() |
function FindAvailableSlot(RequiredResources: TList; StartDate,
EndDate, StartTime, EndTime, TimeIncrement, Duration: TDateTime): TDateTime; function FindAvailableSlot(RequiredResources: TList; StartDate, EndDate, StartTime, EndTime, TimeIncrement, Duration: TDateTime; Days: TssDays): TDateTime; |
Finds a datetime when all the listed resources are available. Searches between the start and end dates specified, for availability between the start and end times specified. | ||
FindNearestSlot | ![]() ![]() |
(point: TPoint): TssResourceAllocation |
Finds the allocation nearest to the specified position. Returns nil if there are no allocations.. | ||
FindSlot | ![]() ![]() |
(point: TPoint): TssResourceAllocation |
Finds the allocation displayed at the specified position. Returns nil if none. | ||
FirstDisplayedIndex | ![]() ![]() |
integer |
The index of the top-most resource currently being displayed, or -1 if the chart has no resources. This property can be set to scroll the display. | ||
FirstDisplayedResource | ![]() ![]() |
TssResource |
The top-most resource currently being displayed, or nil if the chart has no resources. This property can be set to scroll the display. | ||
HintStyle | ![]() ![]() |
TssDateTimeStyle |
The style of any automatically generated hints. Defaults to dtDateAndTime. | ||
LastDisplayedIndex | ![]() ![]() |
integer |
The index of the bottom-most resource currently being displayed, or -1 if the chart has no resources. This property can be set to scroll the display. | ||
LastDisplayedResource | ![]() ![]() |
TssResource |
The bottom-most resource currently being displayed, or nil if the chart has no resources. This property can be set to scroll the display. | ||
MinimumDrag | ![]() ![]() |
integer |
The minimum drag, in pixels, that is recognised. Any drag less than this is ignored. | ||
NumDisplayedResources | ![]() ![]() ![]() |
integer |
The number of resources currently being displayed. | ||
Options | ![]() ![]() |
TssResourceAllocationChartOptions |
Various options that control some aspects of the charts bahaviour. | ||
OwnsAnyObject | ![]() ![]() |
boolean |
Whether the object referenced by the AnyObject property is owned by this chart. If the object is owned, it is freed when the chart is destroyed. | ||
PlotRect | ![]() ![]() ![]() |
TRect |
The area of the plot. | ||
RefreshBitmap | ![]() ![]() |
TColor |
Causes the bitmap to be redrawn. This can be useful if the bitmap contains some time-dependant element added in an owner-draw routine. | ||
Resources | ![]() ![]() ![]() |
[indx: integer]: TssResource |
An array of the resources. | ||
RoundTo | ![]() ![]() |
double |
When dragging or stretching allocations, the new start and/or end date/time are rounded to this interval. | ||
SelectAllocationCount | ![]() |
integer |
The number of selected allocations. | ||
SelectAllocations | ![]() |
[indx: integer]: TssResourceAllocation |
A list if the selected allocations. To select an allocation, set its Selected property. | ||
SizingHandleWidth | ![]() ![]() |
integer |
The size of the invisible sizing handle area at the end of each allocation. If the user starts to drag while over this sizing handle, then the allocation is expanded or contracted instead of moved. | ||
StartAt | ![]() ![]() |
TDateTime |
The start date/time of the chart. | ||
Sort | ![]() ![]() |
|
Sorts the resources into alphabetical order. | ||
Sort | ![]() ![]() |
(CompareFunction: TssResourceCompareFunction) |
Sorts the resources. The user-specified compare function can use any properties of the resources to determine their order. | ||
VerticalPageSize | ![]() ![]() ![]() |
integer |
The number of resources that will fit onto the display using the current configuration. | ||
OnAdjustDragRectEvent | ![]() ![]() |
TAdjustDragRectEvent |
An event that allows the allocation drag or stretch rects to be adjusted. This would only be necessary if you were using owner-draw allocations and the default rect was not appropriate. | ||
OnAdjustPlotRectEvent | ![]() ![]() |
TssAdjustPlotRectEvent |
An event that allows the plot rectangle to be adjusted. This could be to allow more room for owner-draw date labels or resource names etc. | ||
OnAfterPaint | ![]() ![]() |
TNotifyEvent |
An event invoked after the bitmap has been painted to the canvas. | ||
OnAllocationAutoHint | ![]() ![]() |
TssAllocationAutoHintEvent |
An event invoked before an automatically generated allocation hint is shown. The hint string may be modified by the event handler. | ||
OnAllocationclick | ![]() ![]() |
TssAllocationEvent |
An event invoked when an allocation is clicked. | ||
OnAllocationDblClick | ![]() ![]() |
TssAllocationEvent |
An event invoked when an allocation is double-clicked. | ||
OnAllocationDrag | ![]() ![]() |
TssAllocationDragEvent |
An event invoked when an allocation is dragged. The StartDateTime and EndDateTime arguments may be adjusted to limit the extent of the drag. | ||
OnAllocationDragCancel | ![]() ![]() |
TssAllocationEvent |
An event invoked when an allocation is dragged then dropped in its original location. | ||
OnAllocationDragEnd | ![]() ![]() |
TssAllocationEvent |
An event invoked when an allocation is dragged then dropped in a new location. | ||
OnAllocationDragEndQuery | ![]() ![]() |
TssAllocationDragQueryEvent |
An event invoked when an allocation is dragged then dropped in a new location, but before the change is made. It gives a last chance to cancel the operation. | ||
OnAllocationDragOverResource | ![]() ![]() |
TssAllocationDragOverResourceEvent |
An event invoked when an allocation from one resource is dragged over another resource. The StartDateTime and EndDateTime arguments can be altered to limit the drag extent, or the Allow argument can be set to false to prevent the drag operation. Note: the OnAllocationSwitchResource event is signalled if the allocation is dropped onto the resource. | ||
OnAllocationDragStart | ![]() ![]() |
TssAllocationDragStartEvent |
An event invoked when an allocation is first dragged. | ||
OnAllocationDraw | ![]() ![]() |
TssAllocationDrawEvent |
An event invoked before an allocation is drawn. It allows the allocation to be drawn with specific colours. | ||
OnAllocationRightClick | ![]() ![]() |
TssAllocationEvent |
An event invoked when an allocation is right-clicked. | ||
OnAllocationSelectionChange | ![]() ![]() |
TssAllocationEvent |
An event invoked when the selected property of an allocation is changed. | ||
OnAllocationStretch | ![]() ![]() |
TssAllocationDragEvent |
An event invoked when an allocation is dragged. The StartTime and EndTime arguments may be adjusted to limit the extent of the stretch. | ||
OnAllocationStretchCancel | ![]() ![]() |
TssAllocationEvent |
An event invoked when an allocation is stretched, but the stretch is then cancelled. | ||
OnAllocationStretchEnd | ![]() ![]() |
TssAllocationEvent |
An event invoked when an allocation is stretched, after the change has been made. | ||
OnAllocationStretchEndQuery | ![]() ![]() |
TssAllocationDragQueryEvent |
An event invoked when an allocation is stretched, but before the change has been made. It gives a last chance to cancel the operation. | ||
OnAllocationStretchStart | ![]() ![]() |
TssAllocationDragQueryEvent |
An event invoked when an allocation is first stretched. | ||
OnAllocationSwitchResource | ![]() ![]() |
TssAllocationSwitchResourceEvent |
An event invoked when an allocation is dropped onto a different resource. | ||
OnAllocationSwitchResourceQuery | ![]() ![]() |
TssAllocationSwitchResourceQueryEvent |
An event invoked when an allocation is dropped onto a different resource, but before the change is made. It gives a last chance to cancel the operation. | ||
OnBeforePaint | ![]() ![]() |
TNotifyEvent |
An event invoked before the bitmap has been painted to the canvas. | ||
OnChange | ![]() ![]() |
TNotifyEvent |
An event invoked when the chart has changed. | ||
OnDateRangeChange | ![]() ![]() |
TNotifyEvent |
An event invoked when the chart start and/or end date/time has changed. | ||
OnDragPlot | ![]() ![]() |
TssDragPlotEvent |
An event invoked when the chart is dragged. The StartTime and EndTime arguments may be adjusted to limit the extent of the drag. | ||
OnDragPlotEnd | ![]() ![]() |
TNotifyEvent |
An event invoked when the chart dragging ends. | ||
OnDragPlotStart | ![]() ![]() |
TssDragPlotStartEvent |
An event invoked when the chart dragging starts. | ||
OnDrawDateLabel | ![]() ![]() |
TssGetDateTimeEvent |
If this event is set, then the DateLabelBase and DateLabelInterval properties are not used. Instead, this event handler is called to return the date/time of each label. It is called repeatedly until it returns a date/time that is outside the chart range (such as 0.0) This event is most useful when the date labels are required to be at a non-regular interval, such as on the first day of each month. | ||
OnDrawDateLine | ![]() ![]() |
TssGetDateTimeEvent |
If this event is set, then the DateLineBase and DateLineInterval properties are not used. Instead, this event handler is called to return the date/time of each label. It is called repeatedly until it returns a date/time that is outside the chart range (such as 0.0) This event is most useful when the date lines are required to be at a non-regular interval, such as on the first day of each month. | ||
OnDrawProgress | ![]() ![]() |
TssDrawProgressEvent |
An event invoked several times during the drawing process. It allows custom graphics to be added at different stages in the drawing process. For example, to add graphics behind the allocations, but on top of the background. | ||
OnDrawResourceName | ![]() ![]() |
TssDrawResourceNameEvent |
An event invoked before the name of the resource is displayed. This event allows you to control the colour of the text. | ||
OnGetDateTimeLabelText | ![]() ![]() |
TGetDateTimeLableEvent |
Allows bespoke date and time labels. | ||
OnGetPlotBackground | ![]() ![]() |
TssGetPlotBackgroundEvent |
This event to allows the irregular colouring of the plot background. For example, to allow weekends to be in a different colour. | ||
OnResourceNameClick | ![]() ![]() |
TssResourceEvent |
An event invoked when a resource name is clicked. | ||
OnResourceNameDblClick | ![]() ![]() |
TssResourceEvent |
An event invoked when a resource name is double-clicked. | ||
OnResourceNameAutoHint | ![]() ![]() |
TssResourceNameAutoHintEvent |
An event invoked when the mouse is over a resource name. The Hint argument must be set to cause a hint to appear. | ||
OnResourceNameRightClick | ![]() ![]() |
TssResourceEvent |
An event invoked when a resource name is right-clicked. | ||
OnRightClick | ![]() ![]() |
TNotifyEvent |
An event invoked when the chart is right-clicked. | ||
OnOwnerDrawAllocation | ![]() ![]() |
TssAllocationOwnerDrawEvent |
An event invoked to draw an allocation bar when the racOwnerDrawAllocations option is set. | ||
OnOwnerDrawDateLabel | ![]() ![]() |
TssOwnerDrawDateLabelEvent |
An event invoked to draw a date label when the racOwnerDrawDateLabels option is set. | ||
OnOwnerDrawResourceName | ![]() ![]() |
TssOwnerDrawResourceNameEvent |
An event invoked to draw a resource name when the racOwnerDrawResourceNames option is set. | ||
OnPlotRectChange | ![]() ![]() |
TNotifyEvent |
An event invoked when the size or location of the plot area changes. | ||
OnVerticalScroll | ![]() ![]() |
TNotifyEvent |
An event that is fired when the chart is scrolled vertically. | ||
AddResource | ![]() ![]() |
(ResourceName: string; Color: TColor = clBtnFace; Style: TssResourceDisplayStyle = rsLineArrow): TssResource |
This function creates a new resource and adds it to the chart. It returns a reference to the newly created resource. | ||
BeginUpdate | ![]() ![]() |
() |
Starts buffering updates. One call to EndUpdate should be called for each call to BeginUpdate. | ||
Clear | ![]() ![]() |
() |
Deletes all resources and allocations. | ||
DateTimeToX | ![]() ![]() |
(dt: TDateTime): integer |
Converts a TDateTime to a chart x-coordinate. | ||
DeselectAllAllocations | ![]() ![]() |
() |
Deselects all selected allocations. | ||
EndUpdate | ![]() ![]() |
() |
Stops buffering updates. One call to EndUpdate should be called for each call to BeginUpdate. | ||
ExchangeResources | ![]() ![]() |
(Resource1, Resource2: TssResource) |
or |
(ResourceIndex1, ResourceIndex2: integer) | |
Exchanges two resources so that they swap position in the chart. | ||
FindResource | ![]() ![]() |
FindResource(aResourceName: string; CaseSensitive: boolean = false): TssResource |
Returns the resource with the specified name, or nil if there is no resource. | ||
FindResourceFromY | ![]() ![]() |
(Y: integer; Strict: boolean = true): TssResource |
Returns the resource displayed at a specified Y position, or nil if there is no resource. If Strict is false, then it will return the nearest resource. | ||
IndexOf | ![]() ![]() |
(Resource: TssResource): integer |
Returns the index of a particular resource, or -1 if the resource is not found. | ||
InsertResource | ![]() ![]() |
(Place: integer; ResourceName: string; Color: TColor = clBtnFace; Style: TssResourceDisplayStyle = rsLineArrow): TssResource |
This function creates a resource and inserts it into the chart at a specific index. It returns a reference to the newly created resource. | ||
Invalidate | ![]() ![]() |
() |
Invalidates the chart area causing a re-paint. | ||
PaintTo | ![]() ![]() |
(Canvas: TCanvas; Rct: TRect; TopIndex: integer): integer |
![]() ![]() |
(Canvas: TCanvas; Rct: TRect; TopIndex: integer; Appearance: TssResourceAllocationChartAppearance): integer; | |
Draws the chart to the specified rectangle on the specified canvas. Optionally, using the specified appearance instance. Returns the index of the last resource displayed. | ||
ScrollChart | ![]() ![]() |
(Increment: TDateTime) |
Scrolls the chart by the specified amount. Use negative increments to scroll to an earlier date/time range. | ||
SetDateTime | ![]() ![]() |
(StartAt, EndAt: TDateTime) |
Sets the StartAt and EndAt properties in a single operation. | ||
SortAllocations | ![]() ![]() |
() |
Sorts the allocations into increasing date/time order for all resources. | ||
XToDateTime | ![]() ![]() |
(x: integer): TDateTime |
Converts a chart x-coordinate to the corresponding date/time. |
In addition, the following published properties are inherited from TCustomPanel.
Align | Anchors | BevelInner | BevelOuter | BevelWidth |
BorderStyle | BorderWidth | Constraints | Ctl3D | DragCursor |
DragKind | DragMode | Hint | ParentCtl3D | ParentShowHint |
PopupMenu | ShowHint | OnCanResize | OnClick | OnConstrainedResize |
OnDblClick | OnDockDrop | OnDockOver | OnDragDrop | OnDragOver |
OnEndDock | OnEndDrag | OnEnter | OnExit | OnGetSiteInfo |
OnMouseDown | OnMouseMove | OnMouseUp | OnMouseWheel | OnMouseWheelDown |
OnMouseWheelUp | OnResize | OnStartDock | OnStartDrag | OnUnDock |
- Overview
- Download
- Screen Shots
- Properties
- FAQ & Getting Started
- User Comments
- Support Forum
- Change History
- License
- Buy
What People Say |
---|
![]() Great component... ![]() Danny Banks, FMI Solutions Limited |
More … |