Hello,
I am in the process of creating a planner application.
However the built in Planner editor is not sufficiant, so i ahev crearted my own custom "Form" for adding new Items.
Question - Can I or how do i add the "TMSFNCPlannerItemEditorRecurrency" option to my custom form?
Thank you
David
Hi,
You can re-use the content panel & initialize the content with a planner item with the following code:
procedure TForm4.FormCreate(Sender: TObject);
var
p: TTMSFNCPlannerItemEditorRecurrencyContentPanel;
begin
TMSFNCPlannerItemEditorRecurrency1.Planner := TMSFNCPlanner1;
p := TMSFNCPlannerItemEditorRecurrency1.CustomContentPanel;
TMSFNCPlannerItemEditorRecurrency1.InitializeCustomContentPanel;
TMSFNCPlannerItemEditorRecurrency1.Panel.Parent := Self;
TMSFNCPlannerItemEditorRecurrency1.ItemToCustomContentPanel(TMSFNCPlanner1.Items[0], TMSFNCPlannerItemEditorRecurrency1.Panel);
end;
Note that the code will now generate a default recurrency editor, but you can change whatever you want with the TTMSFNCPlannerItemEditorRecurrencyContentPanel variable "p"
Hello,
Many thanks for your assistance, will give this a go. :-)
1 Like
Hello Pieter,
Finaly got round to looking into this. I am having a small issue of getting the Defauilt Content panel to initilise in my custom Tab - what might i be missing?
Much appreciated.
Hello,
I used the code in teh example you provided. I think i am missing the bit to join the default editor to my tab - not sure.
I guess that this line needs to change to:
TMSFNCPlannerItemEditorRecurrency1.Panel.Parent := TabItem1;
Hello Pieter,
Thank you - I feel a bit of an idiot.
That worked ![:slightly_smiling_face: :slightly_smiling_face:](https://support.tmssoftware.com/images/emoji/apple/slightly_smiling_face.png?v=9)
No worries! Thanks for the feedback! ![:wink: :wink:](https://support.tmssoftware.com/images/emoji/apple/wink.png?v=9)