How do I get an own control for every inspector?

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

How do I get an own control for every inspector?
 
Thorsten Dreiner


Guest


Hi team,

I have created a addin for Outlook 2016 and there in I've added a new ADXRibbonDropDown. My problem is, that if I've opened many inspectors, and I change the selected index, all dropdowns in all inspectors are also changed. I would like to have a separate dropdown in each new inspector. How can I reach that?

Thx. Thorsten Dreiner
Posted 09 Mar, 2017 14:02:06 Top
Andrei Smolin


Add-in Express team


Posts: 18844
Joined: 2006-05-11
Hello Thorsten,

Please check section Updating ribbon controls at run time at https://www.add-in-express.com/docs/net-ribbon-components.php#properties-events.


Andrei Smolin
Add-in Express Team Leader
Posted 10 Mar, 2017 05:19:51 Top
Thorsten Dreiner


Guest


Hi Andrei,

thanks for your answer. Could you please help me again with one more question? I have a custom dropdown in my ribbon and I would like to fill it with custom entries for each new inspector. So I have to referece the ribbon dropdown control in the new inspector event. How can I reference the ribbon dropdown control reffering to the current inspector?
Posted 13 Mar, 2017 04:02:33 Top
Andrei Smolin


Add-in Express team


Posts: 18844
Joined: 2006-05-11
Hello Thorsten,

This works in another way. When you get the PropertyChanging event on a Ribbon control, you identify the context (which should be an Outlook.Inspector object). I suggest that you add just one codeline to the event handler of the PropertyChanging event of your Ribbon dropdown. The code line should use System.Diagnostics.Debug.WriteLine() to issue a debug message. Also, you need to download and start the DebugView utility to collect the debug messages at the run time. The debug message should provide the following info: the property being changed and property value. This will show you how Office updates the dropdown.

Then you would need to modify the code so that it provides a different number of items depending on the inspector window (see e.Context) in which your control is shown.


Andrei Smolin
Add-in Express Team Leader
Posted 13 Mar, 2017 05:24:11 Top