john230873
Programmer
I have written 2 classes. 1 called TDayPanel and another called TCalendarPanel, both are classes of TPanel.
The TDayPanel has on onclick event that changes a property and colour of the panel i.e. when clicked if not setected it becomes select and if it is selected it becomes unslected.
The TCalendarPanel has 41 TDayPanel objects
For n := 0 to 41 do
begin
With TPanelDay.Create(Self,GetDateForPanel
)DO
begin
Left := Panelleft;
Top := PanelTop;
Parent := self;
end;
end;
What I need to do is inside the TCalendarPanel class if any of the TDayPanel objects are clicked then run another procedure. I tried adding the line OnClick := DayPanelClicked; to the above statement but it then overrided the TDayPanel classes onclick procedure. I need both to run.
Any ideas
The TDayPanel has on onclick event that changes a property and colour of the panel i.e. when clicked if not setected it becomes select and if it is selected it becomes unslected.
The TCalendarPanel has 41 TDayPanel objects
For n := 0 to 41 do
begin
With TPanelDay.Create(Self,GetDateForPanel
begin
Left := Panelleft;
Top := PanelTop;
Parent := self;
end;
end;
What I need to do is inside the TCalendarPanel class if any of the TDayPanel objects are clicked then run another procedure. I tried adding the line OnClick := DayPanelClicked; to the above statement but it then overrided the TDayPanel classes onclick procedure. I need both to run.
Any ideas