Adding calendar in runtime

Cableguy

Expert
Licensed User
Hi Erel,

I know it is possible with an external DLL, but, since the calendar is already a built-in control, why can't we add it in runtime?
 

willisgt

Active Member
Licensed User
As an alternative to adding the control at runtime...

I ran into the same problem. I overcame it by hiding a calendar on a 'common' form (never gets displayed) and using formlib.changeParent to move the calendar to whatever form I needed it on. When the form is closed, the calendar gets moved back to the 'common' form (again, via formlib.changeParent).

Naturally, this has the disadvantage that only one calendar is available for this purpose at any given moment... but I suppose that two or more would be possible. I just wouldn't want to code it.


Gary
 

Cableguy

Expert
Licensed User
Thanks willisgt...

Since I am trying to add all the controls in runtime, I searched the forum and found the controls dll from Agraham...
Still has the disavantage to not be able to add directly to a panel, but it can be created in runtime, and latters changed it's parent to the panel...
 
Top