Lazarus

Programming => Packages and Libraries => Topic started by: Nicole on July 21, 2022, 03:26:30 pm

Title: tvPlanit - newbie question about context menue in Lazarus
Post by: Nicole on July 21, 2022, 03:26:30 pm
In Delphi I drag a popup menue onto my form and link it to anywhere.
This popup-control on my form I could edit.

I tvPlanit I hit F9, and see a context menue at runtime and it is functional.
Where can I grab it?
There is nothing at the form?
Is it created at runtime or does Lazarus use a different sytem for context menues?

What I want is to get the in tvplanit the "read iCal data" - method away from the context menue into an own button (and show a warning before 'danger of data mess').
How can I do this?
Title: Re: tvPlanit - newbie question about context menue in Lazarus
Post by: wp on July 21, 2022, 06:00:56 pm
The TvPlanIt components create an internal popup menu (FDefaultPopup) at runtime - see the TDayView/TMonthView/TWeekView procedures InitializeDefaultPopup. Unfortunately this method is not public and not virtual, thus you cannot override it.

Of course you can drop a TPopupMenu component on the form and assign it to the dayview's/monthview's/weekview's PopupMenu property. Then, however, you must code the behaviour of this menu yourself, there is no way that you can reuse items of the built-in menu. Yet another design flaw of the original VisualPlanIt components...
TinyPortal © 2005-2018