Forum > Packages and Libraries

TvPlanIt - customize font event


Nicola Gorlandi:
Hi all,

At the momenti it is possibile to have different background color using event category.

I would like to set event font color based on an userfield value on month and week view.

Is this possible or I have to customize component code ?

I check OwnerDrawCells event but is too "in dept", it requires to draw everything from the scratch.

Many thanks,

In the new commit r8667, the controls TVpDayView, TVpWeekView and TVpMonthView have a new event OnPrepareEventFont(Sender: TObject; AEvent: TVpEvent; AFont: TFont) which fires immediately before the event text is painted. In its handler, you can change font parameters depending on other parameter, e.g. on properties of AEvent. Note, however, that the size of the event rectangle already has been calculated, therefore it is not recommended to change the font size.

Nicola Gorlandi:
Many thanks, this sound real good. I will check it asap.


[0] Message Index

Go to full version