Inspector ADX Form

Add-in Express™ Support Service
That's what is more important than anything else

Inspector ADX Form
how to make it visible only for some types of inspector window 
hs dreamer


Guest


I need that form to appear only in some types of inspector, for example, when CurrentItem is mail and mail is not send (that opened to be edited now). if I work with current form instance, created by ADX, there are still visible panel under it, but when i trying to disable ADX form it disappers for all inspector windows... what you can suggest me?
Posted 06 Sep, 2006 05:21:38 Top
Fedor Shihantsov


Guest


Use the adxOlFormsManager.ADXNewInspector event.


// 
// adxOlFormsCollectionItem1
// 
//this.adxOlFormsCollectionItem1.FormClassName = "TestAddin.ADXOlForm1";
//this.adxOlFormsCollectionItem1.InspectorItemTypes = AddinExpress.OL.ADXOlInspectorItemTypes.olMail;
//this.adxOlFormsCollectionItem1.InspectorLayout = AddinExpress.OL.ADXOlInspectorLayout.RightSubpane;


private void adxOlFormsManager1_ADXNewInspector(object inspectorObj)
{
    object currentItem = (inspectorObj as Outlook.Inspector).CurrentItem;
    Outlook.MailItem mailItem = currentItem as Outlook.MailItem;
    if (mailItem != null)
    {
        // prevents removing cashed forms
        adxOlFormsManager1.LockUpdates(); 
        if (mailItem.Subject == "MySubject")
        {
            adxOlFormsManager1.Items[0].Enabled = false;
        }
        else
        {
            adxOlFormsManager1.Items[0].Enabled = true;
        }
        adxOlFormsManager1.UnlockUpdates();
    }
}
Posted 06 Sep, 2006 10:37:51 Top
David Ing




Posts: 56
Joined: 2006-06-27
Fedor,

I might be doing something wrong, but when I previously used the .Enabled flag on a FormsManager.Item, and wrapped it in FormsManager Lock/UnLockUpdates, then it failed to work.

It's only when I removed the Lock/UnlockUpdate just around the .Enable property that it seems to trigger it ok (this doesn't apply other properties, just .Enable).

Posted 06 Sep, 2006 11:15:52 Top
Fedor Shihantsov


Guest


David,

What do you mean "it failed to work"?
Can you give me more details?
Posted 11 Sep, 2006 12:15:45 Top