Component within Component problem
Please help me, I don't have much hair left.
I have used the Delphi Sample Source code, but to no avail.
I am having a difficult time getting the TStringCalendar.tClick method
called. Can anybody help me? I am willing to try anything at this point.
Thank you in Advance.
TStringCalendar = class(TCalendar)
private
Procedure tClick(Sender: TObject);
public
FDayBox: TListbox;
constructor Create(AOwner: TComponent); override;
implementation
Procedure TStringCalendar.tClick(Sender: TObject);
BEGIN
Fdaybox.hide;
END;
constructor TStringCalendar.Create(AOwner: TComponent);
VAR
I,J:INTEGER;
TempList:TStringList;
BEGIN
Inherited Create (AOwner);
fDaybox:=Tlistbox.Create(AOwner);
fDaybox.Parent:=Self;
fDaybox.Visible:=False;
fDaybox.Onclick:=tClick;
fDaybox.Left:=50;
fDaybox.Top:=50;
END;
END;
function TStringCalendar.SelectCell(ACol, ARow: Longint): Boolean;
VAR
TheCellText: STRING;
BEGIN
Inherited SelectCell(ACol, ARow);
TheCellText := CellText[Col, Row];
if (TheCellText < '9') and (TheCellText > '0') then BEGIN
Day := StrToInt(TheCellText);
Fdaybox.Items.Assign(Cellstrings[Day]);
Fdaybox.Visible:=True;
END;
END;