Ken Puls
Posts: 34
Joined: 2014-12-17
|
I'm having a challenge with connecting to a certain ribbon control so that I can invalidate it.
The scenario I'm working with is that I have a checkbox which changes a global variable to True/False. I then need to invalidate three controls on my Ribbon so it fires the PropertyChanging event to set the states of the controls (and their menu items) correctly. The part I'm struggling with is getting a reference to those controls so that I can trigger the invalidation. I've done a ton of searching, but can't find anything that gets me there.
It feels like it should be something like this (VB.NET):
Dim rxMenu As AddinExpress.MSO.ADXRibbonSplitButton = ??
Dim rxBtn As AddinExpress.MSO.ADXRibbonButton = ??
rxMenu.Invalidate()
rxBtn.Invalidate()
I'm just stumped on how to actually connect to the splitbutton in my project. (For reference, each of these two controls lives on my custom "rxMonkeyTools" tab, and the splitbutton obviously has a few child buttons.)
Thanks in advance for any help!Ken Puls, FCPA, FCMA, MS MVP |
|
Andrei Smolin
Add-in Express team
Posts: 18829
Joined: 2006-05-11
|
Hello Ken,
These variables are already defined in your add-in module class; see AddinModule.Designer.vb or, if you have an older project, check AddinModule.vb.
Regards from Poland (CEST),
Andrei Smolin
Add-in Express Team Leader |
|
Ken Puls
Posts: 34
Joined: 2014-12-17
|
Ah brilliant Andrei, thank you. I was able to get there with:
With AddinModule.CurrentInstance
.Adx_SplitButton1.Invalidate()
.Adx_Button1.Invalidate()
End With
Appreciate the help!Ken Puls, FCPA, FCMA, MS MVP |
|