TTMSFMXPlanner advice

Hi,


I need some advice how to use the TTMSFMXPlanner the best way.

I'v created a decendant planner: TMyPlanner = class(TTMSFMXPlanner) and I want to change the default "background".
I want to visually show the user that the day is divided into parts.
e.g.
00:00 - 08:00 inactive
08:00 - 12:00 morning activities
12:00 - 13:00 lunchbreak
13:00 - 16:00 afternoon activities
16:00 - 17:00 reserved
17:00 - 00:00 inactive

All those parts should have different background (fill) colors and a single text with the name of the part displayed in it.
It would also be nice to have a (stroke) color around there entire part (not per cell).

I was fiddling around with the OnBeforeDrawCell event, but that seems to work with a TTMSFMXPlanner, but strangely not with my TMyPlanner decendant.

But maybe there is a (much) better way to accomplish this.

TIA

If you could show us the code you have been using we could take a look at why the beforedrawcell is not being triggered in the TMyPlanner. Other than that, you are using the right approach for drawing customized planner elements.

Hi Pieter,


Actually I'm overriding the DoBeforeDrawCell method, which is the better place to handle my changes.
After long testing I figured out that the settings for TimeLine.ActiveStart and TimeLine.ActiveEnd influence the behaviour.

The background DOESN'T get the correct color between ActiveStart and ActiveEnd.
So if I set them both zero (0) it works, but I can't figure out why this is.

If your willing to share the code, please send it to use so we can investigate this here. We can then search for a proper solution for this issue. You can send the code sample to support@tmssoftware.com with a link to this forum post.

Mail has been sent!