Select to view content in your preferred language

Multiple UserControls in ArcMap Toolbar, VB.Net...

1977
2
04-14-2010 09:18 PM
RobertKoch
Emerging Contributor
Hi,

I have a VB.Net customisation (see attached) which is a toolbar for ArcMap. Each item on the toolbar resides on its own UserControl  (to help improve the ???display stability??? of the toolbar).

My problem is that I can???t seem to communicate effectively between the UserControls. More specifically I want the second ComboBox to be enabled and be aware of value of the selected value in the first ComboBox when the SelectedIndexChanged Event of the first ComboBox occurs (such that the second ComboBox can be populated with values relating to the selection in the first).

Does anyone know how to get a handle on what???s happening in one UserControl from another UserControl? And thoughts or examples would be most appreciated.

I am using 9.3.1 and VS 2008 (ToolAndControlSampleVB2008.sln ??? from the attachment).

Regards. Rob.
0 Kudos
2 Replies
KirkKuykendall
Deactivated User
I would add an arcmap (or editor) extension (IExtension) and have all toolcontrols set a reference to the extension when OnCreate is called.

Each toolcontrol would change a property exposed by the extension.  If a toolcontrol needs to know when a property has changed, then it will need to subscribe to an event on the extension, and you'll need to raise an event when the setter of the property is called.
0 Kudos
RobertKoch
Emerging Contributor
Hi Kirk,

Thanks for your reply.

I�??m still fairly green when it come to VB.Next/ArcObjects so I�??ve been trying to find an example of showing such a use of IExtension to try and better understand your suggestion.  So far I have failed to find such an example.

Do you know of any such resources or have any pointers as to how I might go about implementing IExtension in this scenario?

Regards. Rob.
0 Kudos