Toolbar Addin not Enabling controls...
Toolbar addin for ADX not changing enable state on controls...
|
Jeff Gilbert
Posts: 36
Joined: 2006-03-31
|
In the ExplorerFolderSwitch event I'm running some code to determine if I need to enable my controls. I've got a usercontrol that has a combo and a button. Their initial state is Enabled=False. Then when the folderchanges to the proper folder I enable them. The only problem is that the visual state isn't changing? If I check the values in the sub that changes the state of the buttons it reports back the values I expect, except the button and combo are still visually disabled? It's very strange the code shows what I expect, but the controls visually do not. Below is a pic.
This is in VB.NET 2003, AddInExpress and Toolbar Addin. Any ideas?
|
|
Posted 14 Nov, 2006 06:08:12
|
|
Top
|
|
Dmitry Kostochko
Add-in Express team
Posts: 2887
Joined: 2004-04-05
|
Hi Jeff,
Do you use the ADXCommandBarAdvancedControl.ActiveInstance property? Can you send me some test project with the same behavior?
P.S. Note that we take up your forum requests in the order we receive them.
Besides, it may take us some time to investigate your issue. Please be sure we will let you know as soon as the best possible solution is found.
|
|
Posted 14 Nov, 2006 06:26:40
|
|
Top
|
|
Jeff Gilbert
Posts: 36
Joined: 2006-03-31
|
Strange... I wasn't aware of the ADXCommandBarAdvancedControl.ActiveInstance property. I changed my code to access the user control to this:
DirectCast(acPolicySearch.ActiveInstance, ucPolicySearch).EnableControl(True)
This code didn't work:
ucPolicySearch.EnableControl(True)
So, there ya have it. |
|
Posted 14 Nov, 2006 23:32:30
|
|
Top
|
|
Dmitry Kostochko
Add-in Express team
Posts: 2887
Joined: 2004-04-05
|
Hi Jeff,
I am afraid I don't understand. Does your code work now?
|
|
Posted 15 Nov, 2006 07:17:53
|
|
Top
|
|
Jeff Gilbert
Posts: 36
Joined: 2006-03-31
|
I'm sorry, I wasn't clear... it works great when I access the control via the ActiveInstance property. But it does not trying to access the control directly
This works
DirectCast(acPolicySearch.ActiveInstance, ucPolicySearch).EnableControl(True)
This does not.
ucPolicySearch.EnableControl(True)
That's fine but, the doc's didn't make it very clear that this would be the desirable way to access controls on the toolbar.
Great product though!!! |
|
Posted 15 Nov, 2006 17:44:38
|
|
Top
|
|
Dmitry Kostochko
Add-in Express team
Posts: 2887
Joined: 2004-04-05
|
Hi Jeff,
Thank you for the notification. We will try to make our documentation clearer. The point is that the original control (ucPolicySearch) doesn't appear on toolbars at all, it is rather a pattern/model for cloning. So, in multi-windowed host applications (e.g. Outlook) you see these clones but not the original controls and that is why you need to use the ActiveInstance property to access a particular instance.
|
|
Posted 16 Nov, 2006 05:47:10
|
|
Top
|
|