Thank you for your answer, I wrote this now, - hm, but it does not work.
At the moment I have listed 3 event by my filter.
Hitting "delete" with the method below, makes vanish one line of those three (which may be a mistake in my loop as well).
The pre-problem is: Closing my software and re-open it makes those three lines re-appear. So there may be "deleted" one event, but this seems not to be saved back into the ini-datastore.
If you want it, I can zip my whole software and give you the filter criteria.
If not, here is the method, which makes
- vanish one of wanted 3 events (my be my mistake)
- restores this event again on re-start of the program
// löscht ein Event aus TvPlanner, und bei "false" auch aus meinen Dateien
procedure TTvPlanItFrame.LoescheEvent(Nr: integer; nur_aus_tvPlanit: Boolean = true);
Var res: TVpResource;
event: TVpEvent;
KategorieNr: Integer;
datum: TDateTime;
beschreibung: string;
begin
res := VpControlLink_my.Datastore.Resource; // war VpControlLink1
if res <> nil then
begin
event:=res.Schedule.GetEvent(Nr);
res.Schedule.DeleteEvent(event);
VpControlLink_my.DataStore.PostEvents;
if not nur_aus_tvPlanit then begin // this is false and shall not matter
event:=res.Schedule.GetEvent(Nr);
datum:=event.StartTime;
beschreibung:=event.Description;
KategorieNr:=event.Category;
Erfolg.LoescheTerminAusDatei (datum, beschreibung, KategorieNr);
end; end;
end;