Bert Sinnema
Guest
|
Hi All,
I have an addin that has an ADXOLForm in each inspector. When the inspector is shown I hide the form because we only need it in certain conditions. When the ADXOLForm is not shown and I switch folders in the Explorer, the form instance in the inspector is disposed and will return null on formName.GetForm(inspector); If the form was already shown, it is not disposed.
Is this normal behaviour? If so, can I change that behaviour?
Thanks |
|
Andrei Smolin
Add-in Express team
Posts: 19138
Joined: 2006-05-11
|
Hello Bert,
Bert Sinnema writes:
When the inspector is shown I hide the form
How do you hide it? We suggest that you set ADXOlForm.Visible=false in the ADXBeforeFormShow event. In this case the form instance will be created but won't be shown. Calling GetForm(inspector) will return that instance.
Andrei Smolin
Add-in Express Team Leader |
|
Bert Sinnema
Guest
|
Thanks,
I got a bit lost in spaghetti code so I figured I do a lab project. Everything works as it should when I use your suggestion.
For those who are wondering how to implement multiple forms in a single form pane, I'm sharing my lab projects to the community: https://github.com/bertsinnema/MultiPaneFormsManager, feel free to fork and use in your own documentation.
As per documentation I have added to items to the formManager in the same sub-pane which are hidden by default. When you open a new email message, both forms have an instance on the inspector. Even when hidden I can call them at any point and I can switch between forms.
Best,
Bert |
|
Andrei Smolin
Add-in Express team
Posts: 19138
Joined: 2006-05-11
|
Hello Bert,
Thank you!
Andrei Smolin
Add-in Express Team Leader |
|