In my TPlanner app I want to be able to switch between different modes. Whenever it is switched, all items are cleared and then re-added. plDay works fine. When I switch to plDayPeriod or plMonth, none of the items show on the planner. When I switch back to plDay, items also do not show. The only thing I do differently is set Planner1.Mode.PeriodStartDate and PeriodEndDate for plDayPeriod and plMonth. What could the problem be here?
It is not clear what the problem could be.
The only thing that is changing is the mode. Everything else remains the same.
Without knowing any further details, it is unfortunately very hard for me to guess.
You are filling the collection again?
What time-span do items have? What time-span is the time-axis having in the different modes?
I managed to resolve this. There were several issues but the main problem was that plMonth mode requires the Mode.Month property set whereas plDayPeriod does not seem to. (Seeing the wrong month on the side should have been a clue.) The DisplayStart/End and ActiveStart/End must also be set correctly for the date period.
Thanks for informing the issue was solved.
For plDayPeriod, the Planner.Mode.PeriodStart* and Planner.Mode.PeriodEnd* properties need to be used. For plDay, plMonth, the Planner.Mode.Day, Planner.Mode.Month, Planner.Mode.Year need to be used.