TTMSFNCTaskDialog: two calendar components?


I can see that TTMSFNCTaskDialog can handle many buttons and radiobuttons.
Can I somehow show two calendar components? I need the user to select a date period (FromDate and ToDate). Maybe creating dynamically a panel and two calendar components on it, and then connecting the panel to the Task Dialog?

If it cannot be solved, are alternative solutions?

Thank you!


No, by setting the InputType to titDate you can only use one date selector.

In your case, it would indeed be best to set the InputType to titCustom, put the calendars/selectors that you need on a panel and finally assign the panel to the InputControl property. That way you also have control over the arrangement of the controls.

Keep in mind the TTMSFNCTaskDialog does not manage the InputControl, it only displays it. You'll need to free the panel yourself after displaying the dialog and for that you could use the OnDialogClosed event.