Maurice Schoenmakers
Posts: 17
Joined: 2010-03-21
|
Dear support,
I'm trying to toggle an Outlook form's visibility by clicking a button from a Ribbon button in an Inspector window; this by itself works fine. However, when I click the "Close" button on this form, the form closes (which is good) but it will not reappear when I click the Ribbon button again (which of course is not good).
I'm using similar code to do this with a Word pane and that works like a charm.
Furthermore, when I open 2 email composer windows I'd like each window's ribbon button to control its corresponding form. Thus the button in compose window 1 should be able to toggle the form in window 1, while the button in compose window 2 should be able to toggle the form in window 2.
Any idea how to fix this?
Thanks,
Regards,
Maurice Schoenmakers |
|
Alexander Solomenko
Posts: 140
Joined: 2009-02-27
|
Hi Maurice,
Exactly. You described the behavior that is expected.
Maybe there is a bug in Add-in Express.
Please let us know the Office version, the Windows version and platform (x86, x64), and
the Add-in Express version.Regards,
Aleksandr Solomenko |
|
Maurice Schoenmakers
Posts: 17
Joined: 2010-03-21
|
Dear Aleksandr,
Thank you for your reply.
I'm currently using Windows XP (SP3, x86) with Office 2007 (SP2) and Add-In Express version I'm using is:
2010 Professional version (Add-in Express 2010 for Office .NET, Professional (6.00 b3044)
I hope you can help me out here :)
Best regards,
Maurice Schoenmakers |
|
Alexander Solomenko
Posts: 140
Joined: 2009-02-27
|
Hi Maurice,
Sorry for the delay.
I have tested the form visibility by clicking a button from a Ribbon tab. It is works fine.
That is my code:
private void adxRibbonButton1_OnClick(object sender, AddinExpress.MSO.IRibbonControl control, bool pressed)
{
for (int i = 0; i < adxOlFormsManager1.Items[0].FormInstanceCount; i++)
{
AddinExpress.OL.ADXOlForm form = adxOlFormsManager1.Items[0].FormInstances(i);
{
if (form.Visible)
form.Hide();
else
form.Show();
}
}
}
This code will manage all forms of all open inspectors.
To control a form of specific inspector you need to check the context of the inspector in which this event raises (use the parameter control.context of this event).Regards,
Aleksandr Solomenko |
|