D
doud
Unregistered / Unconfirmed
GUEST, unregistred user!
我给 TCalendar 加入了OnDrawCell事件,其他都正常,但调用时却没响应,
请问哪出了问题?
unit fhlcalendar;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
Grids, Calendar;
type
TDrawCellEvent = procedure (Sender: TObject; ACol, ARow: Longint;
Rect: TRect; State: TGridDrawState) of object;
TFHLCalendar = class (TCalendar)
private
FOnDrawCell: TDrawCellEvent;
{ Private declarations }
protected
{ Protected declarations }
public
{ Public declarations }
published
property OnMouseDown;
property FixedColor;
property Row;
property Col;
property OnDrawCell: TDrawCellEvent read FOnDrawCell write FOnDrawCell;
{ Published declarations }
end;
procedure Register;
implementation
procedure Register;
begin
RegisterComponents ('FHL', [TFHLCalendar]);
end;
end.
请问哪出了问题?
unit fhlcalendar;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
Grids, Calendar;
type
TDrawCellEvent = procedure (Sender: TObject; ACol, ARow: Longint;
Rect: TRect; State: TGridDrawState) of object;
TFHLCalendar = class (TCalendar)
private
FOnDrawCell: TDrawCellEvent;
{ Private declarations }
protected
{ Protected declarations }
public
{ Public declarations }
published
property OnMouseDown;
property FixedColor;
property Row;
property Col;
property OnDrawCell: TDrawCellEvent read FOnDrawCell write FOnDrawCell;
{ Published declarations }
end;
procedure Register;
implementation
procedure Register;
begin
RegisterComponents ('FHL', [TFHLCalendar]);
end;
end.