Hello,
I can add a event using TMSFMXCalendar1.Events.add.
If I use TMSFMXCalendar1.GetEventsByDate(ADate) I can see all events but how can I remove those event ? A working sample will be the best for me.
Thanks in advance,
Eric
I have the following error :
E2018 Type Record, Object or Class required
for the line
arr.Free;
where Free is underlined.
here is my code :
procedure TForm1.TMSFMXCalendar1DaySelect(Sender: TObject; ADate: TDate);
var
evnt: TTMSFMXCalendarEvent;
lstevnt: TTMSFMXCalendarEventsArray;
Couleur: TAlphaColor;
Fichier, TextIni, Texte, Chemin: string;
i: Integer;
begin
if rb4.IsChecked then
begin
lstevnt := TMSFMXCalendar1.GetEventsByDate(ADate);
TMSFMXCalendar1.BeginUpdate;
TMSFMXCalendar1.SelectedDay := -1;
for i := 0 to Length(lstevnt)-1 do
lstevnt.Free; <--- ERROR 2018
TMSFMXCalendar1.EndUpdate;
with vacances
do
begin
Couleur := TAlphaColorRec.Null;
Sorte := TTMSFMXCalendarDateEventKind.ekDiamond;
Texte := '';
end;
end
else
.....
Thanks in advance,
Eric
I have found the solution :
arr.free;
And it's working.
Thanks in advance
There was a type mistake in my code, please use
arr.free
les crochets disparaissent. (I don't know the term in English)
brackets disappear ?
Yes, it seems like the brackets disappear, we are taking a look at it.
The "Enable BBcodes to format post" can be turned off to accomplish this