Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Outlook / Programming Add-Ins / April 2008

Tip: Looking for answers? Try searching our database.

Invalidate control in Ribbon

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
goran - 07 Apr 2008 14:12 GMT
I have a custom toobar that I create calling getcustomUI in connect module.
In the xml that I create on the fly i have a dropDown box. I load dropDown
dynamically so i provided getItemCount getItemId, getItemLabel callbacks.
Ocassionally I have to refresh dropDown based on the user selection in
dropDown and I do that by calling ribbon.invalidateControl. In the case that
I have multiple email Inspectors open I am able to get the correct inspector
and I have a global variable that reference ribbon object. My problem is when
I call ribbon.invalidatecontrol from my inspector wrapper class, it
invalidates all the dropdown in all open inspectors. Any ideas how to
invalidate control only in specific inspector?

Thanks,

Goran
Ken Slovak - [MVP - Outlook] - 07 Apr 2008 23:16 GMT
Since you have to supply the controlID for the ribbon control you want
invalidated are you supplying a unique controlID, where each dynamic control
for each open Inspector has a unique controlID?

Signature

Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm

>I have a custom toobar that I create calling getcustomUI in connect module.
> In the xml that I create on the fly i have a dropDown box. I load dropDown
[quoted text clipped - 13 lines]
>
> Goran
goran - 08 Apr 2008 13:06 GMT
Hi Ken,

IRibbonExtensibility_GetCustomUI is called only once when the Inspector of
that type(i.e. Microsoft.Outlook.Mail.read)  loads the first time, and this
is when UI gets created and controls assign their IDs. Right? How can create
new control and assign unique controlID to a control every time different
Inspector opens, when this prosedure run only once? How can I dynamically
create control when Inspector opens? I could do this with CommandBars, where
I put the code to create new control in New Inspector event that gets called
every time inspector opens, but not with ribbons.

Thanks for your help,

Goran

> Since you have to supply the controlID for the ribbon control you want
> invalidated are you supplying a unique controlID, where each dynamic control
[quoted text clipped - 17 lines]
> >
> > Goran
Ken Slovak - [MVP - Outlook] - 08 Apr 2008 16:52 GMT
That's correct. So any change made to the dynamic content would affect every
open Inspector and every one opened after that. That's a ribbon limitation
that wasn't very well thought out despite our bugs and complaints during the
beta.

Not much you can do about that really with a combobox control. I try to
avoid them for that and other reasons, as I mentioned earlier to you in this
or another thread. What I usually use instead, although it's not a complete
substitute, is the dynamic menu control. I can supply different content to
each Inspector based on invalidation of the control and supplying specific
content based on the ActiveInspector.

Signature

Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm

> Hi Ken,
>
[quoted text clipped - 14 lines]
>
> Goran
goran - 08 Apr 2008 17:07 GMT
Thank you Ken.

> That's correct. So any change made to the dynamic content would affect every
> open Inspector and every one opened after that. That's a ribbon limitation
[quoted text clipped - 26 lines]
> >
> > Goran
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.