| Class TBaseCalendar (unit Enhcalnd) |
TCustomGrid
| Constructors |
constructor Create(AOwner: TComponent);TBaseCalendar
| Functions |
function DaysThisMonth: Integer;
destructor Destroy;
function GetComponentImage: TBitmap;
function IsWeekend(ADay: integer): boolean;
procedure MouseToCell(X, Y: Integer; var ACol, ARow: Longint);
procedure NextMonth;
procedure NextYear;
procedure PrevMonth;
procedure PrevYear;
procedure UpdateCalendar;
procedure Click;
function DaysPerMonth(AYear, AMonth: Integer): Integer;
procedure DrawCell(ACol, ARow: Longint; ARect: TRect; AState: TGridDrawState);
function IsLeapYear(AYear: Integer): Boolean;
procedure Loaded;Loaded override
function SelectCell(ACol, ARow: Longint): Boolean;
function GetCellText(ACol, ARow: Integer): string;
function GetDateElement(Index: Integer): Integer;
procedure SetBlockedColor(Value: TColor);
procedure SetBlockWeekends(Value: Boolean);
procedure SetBounds(ALeft, ATop, AWidth, AHeight: Integer);
procedure SetCalendarDate(Value: TDateTime);
procedure SetDateElement(Index: Integer; Value: Integer);
procedure SetFixedHeader(Value: Boolean);
procedure SetHookEvent(Value: TNotifyEvent);
procedure SetStartOfWeek(Value: TDayOfWeek);| Properties |
property BlockedColor : TColor
property BlockWeekends : Boolean
property CalendarDate : TDateTime
property CellText : string
property Day : Integer
property FixedHeader : Boolean
property HookEvent : TNotifyEvent
property Month : Integer
property ReadOnly : Boolean
property StartOfWeek : TDayOfWeek
property Year : Integer| Events |
event OnDateChange : TDateChange
event OnMonthChange : TMonthChange
event OnYearChange : TYearChange| Variables |
FBlockedColor : TColor;
FBlockWeekends : Boolean;
FDate : TDateTime;
FDateChange : TDateChange;
FEventList : TEventList;
FFixedHeader : Boolean;
FHookEvent : TNotifyEvent;
FMonthChange : TMonthChange;
FMonthOffset : Integer;
FReadOnly : Boolean;
FStartOfWeek : TDayOfWeek;
FUpdating : Boolean;
FYearChange : TYearChange;| Constructors |
constructor Create(AOwner: TComponent);Public declarations
TBaseCalendar
| Functions |
function DaysThisMonth: Integer;DaysThisMonth - support routine to return the days in the current month
destructor Destroy;defaults
function GetComponentImage: TBitmap;GetComponentImage - method to turn on-screen rendering into a bitmap. Allows easy printing } {$IFDEF WIN32
function IsWeekend(ADay: integer): boolean;IsWeekend - support routine to determine if a given day is a weekend
procedure MouseToCell(X, Y: Integer; var ACol, ARow: Longint);MouseToCell - support routine to convert the mouse position to cell coords
procedure NextMonth;NextMonth
procedure NextYear;NextYear
procedure PrevMonth;PrevMonth
procedure PrevYear;PrevYear
procedure UpdateCalendar;UpdateCalendar - central "engine"
procedure Click;Click override - sets day to the cell clicked
function DaysPerMonth(AYear, AMonth: Integer): Integer;DaysPerMonth - protected implementation of DaysThisMonth
procedure DrawCell(ACol, ARow: Longint; ARect: TRect; AState: TGridDrawState);DrawCell override
function IsLeapYear(AYear: Integer): Boolean;IsLeapYear - support routine
procedure Loaded;Protected declarations
Loaded override
function SelectCell(ACol, ARow: Longint): Boolean;SelectCell override - returns false for cells that shouldn't be selected
function GetCellText(ACol, ARow: Integer): string;GetCellText - property access method to return the selected date as a string. Acts as a storage device for the dates
function GetDateElement(Index: Integer): Integer;SetDateElement - internal method to get day, month or year
procedure SetBlockedColor(Value: TColor);SetBlockedColor - property access method to set the color for blocked days. clSilver doesn't look good.
procedure SetBlockWeekends(Value: Boolean);SetBlockWeekends - property access method to toggle weekend blocking.
procedure SetBounds(ALeft, ATop, AWidth, AHeight: Integer);trigger OnDateChange and all HookEvents
procedure SetCalendarDate(Value: TDateTime);SetCalendarDate - property access method to set calendar focused date
procedure SetDateElement(Index: Integer; Value: Integer);SetDateElement - internal method to set day, month or year
procedure SetFixedHeader(Value: Boolean);SetFixedHeader - property access method to toggle fixed header
procedure SetHookEvent(Value: TNotifyEvent);SetHookEvent - property access method to attach a HookEvent
procedure SetStartOfWeek(Value: TDayOfWeek);SetStartOfWeek - property access method to change the starting day of the week.
| Properties |
property BlockedColor : TColor
property BlockWeekends : Boolean
property CalendarDate : TDateTime
property CellText : string
property Day : Integer
property FixedHeader : Boolean
property HookEvent : TNotifyEvent
property Month : Integer
property ReadOnly : Boolean
property StartOfWeek : TDayOfWeek
property Year : Integer| Events |
event OnDateChange : TDateChange
event OnMonthChange : TMonthChange
event OnYearChange : TYearChange| Variables |
FBlockedColor : TColor;
FBlockWeekends : Boolean;Private declarations
FDate : TDateTime;
FDateChange : TDateChange;
FEventList : TEventList;
FFixedHeader : Boolean;
FHookEvent : TNotifyEvent;
FMonthChange : TMonthChange;
FMonthOffset : Integer;
FReadOnly : Boolean;
FStartOfWeek : TDayOfWeek;
FUpdating : Boolean;
FYearChange : TYearChange;