YOUSEFUL / DELPHI / COMPONENTS

TAtlasAppointment

One appointment of a TAtlasSchedule: ID, caption, resource, half-open interval and colour.

Record Unit Atlas.Schedule · Product Atlas VCL

Description

Value record returned by TAtlasSchedule.Appointment and Query. It is a copy: to change an appointment call TAtlasSchedule.Update with the new values. StartsAt is inclusive and EndsAt exclusive, so an appointment from 09:00 to 10:00 does not overlap one starting at 10:00.

Members

MemberKindWhat it does
IDfieldIdentifier assigned by TAtlasSchedule.Add, starting at 1 and never reused within the schedule.
CaptionfieldText shown inside the appointment block by TAtlasScheduler.
ResourcefieldName of the resource the appointment occupies.
StartsAtfieldStart of the interval, inclusive.
EndsAtfieldEnd of the interval, exclusive.
ColorfieldFill colour of the block in $00BBGGRR form (a TColor value); TAtlasSchedule.Add defaults it to $00B99036.

Fields

ID field

ID: Integer;

Identifier assigned by TAtlasSchedule.Add, starting at 1 and never reused within the schedule. 0 is never a valid ID; TAtlasScheduler.SelectedID uses 0 for no selection.

Caption field

Caption, Resource: string;

Text shown inside the appointment block by TAtlasScheduler.

Resource field

Caption, Resource: string;

Name of the resource the appointment occupies. Conflicts are checked per resource; the comparison is case-sensitive.

StartsAt field

StartsAt, EndsAt: TDateTime;

Start of the interval, inclusive. Must be at least 1 as a TDateTime (31 December 1899) and before EndsAt.

EndsAt field

StartsAt, EndsAt: TDateTime;

End of the interval, exclusive. Must be after StartsAt and no later than 31 December 9999.

Color field

Color: Integer;

Fill colour of the block in $00BBGGRR form (a TColor value); TAtlasSchedule.Add defaults it to $00B99036. Appointment colours are data and are not changed by TAtlasThemer.

Examples

Read an appointment back

The record is a copy; format its fields for display.

pascal
uses System.SysUtils, Atlas.Schedule;

function Describe(Schedule: TAtlasSchedule; ID: Integer): string;
var
  Item: TAtlasAppointment;
begin
  Item := Schedule.Appointment(ID);
  Result := Format('%s (%s): %s to %s', [Item.Caption, Item.Resource,
    FormatDateTime('ddd hh:nn', Item.StartsAt), FormatDateTime('hh:nn', Item.EndsAt)]);
end;

TAtlasSchedule · TAtlasScheduler

Also in Atlas VCL

TAtlasTable · TAtlasGrid · TAtlasValueEdit · TAtlasTree · TAtlasWorkbook · TAtlasSheetGrid · TAtlasPivot · TAtlasInspector · TAtlasRichEdit · TAtlasSpellChecker · TAtlasChart · TAtlasGauge · TAtlasThemer · TAtlasWizard · TAtlasWorkspace · TAtlasCommandBar · TAtlasActionTile · TAtlasTileBoard · TAtlasNavigation · TAtlasMap · TAtlasGraph · TAtlasDiagram · TAtlasPrintDocument · TAtlasSchedule · TAtlasScheduler · TAtlasTaskPlan · TAtlasGantt · TAtlasPdfDocument · TAtlasPdfViewer