I have a Control in ArcMap in which I created with buttons, A Listbox and some more buttons. I want to add coordinate items to the list box.
Scenario:
- A user clicks a Add a Coordinate button on the control.
- The user then clicks on the map to add the coordinate find the coordinate on the map.
- The coordinate gets added to the list box.
After I am done, I will run some analysis开发者_开发百科 on the list box coordinates... I just need to capture more than one coordinate. So I need to find an OnMouseDown event that I can either attach onto of something along those lines.
This is all being built in a control though, so I need to have the button on this control and NOT in a toolbar.
Thanks All!
I'd write a class that inherits from BaseTool. Have the button click event, create a new instance of the class, passing a reference to the form (or control) as a constructor arg. Set IApplication.CurrentTool to this new instance.
Override the MouseDown and call the AddPoint(IPoint) method exposed by your form (or control). Implement AddPoint so that it populates the list box.
精彩评论