Quantcast
Channel: Forums - ArcObjects SDKs
Viewing all articles
Browse latest Browse all 1374

How to create a Textbox on a toolbar in ArcGIS 10.2?

$
0
0
All,

I am porting an old VB6 project to a 10.2.1 VB .Net ESRI AddIn and hit the "wall".

On the old VB6 toolbar I had a TextBox which was an editbox on a form with a class implementing IToolControl and ICommand. I am attempting to recreate this as part of my AddIn toolbar.

First of all unless I have missed something there is no textbox addin?

Assuming this is the case I have created a usercontrol with nothing more than a label and an editbox on it. I have then created a class that implements IToolControl and ICommand.

In this Class I have a private object which is an instance of the userControl

Code:

Private m_UC As HER_AddIn.ucTextBox = New HER_AddIn.ucTextBox
In the property hWnd I return

Code:

    Public ReadOnly Property hWnd As Integer Implements ESRI.ArcGIS.SystemUI.IToolControl.hWnd
        Get
            Return m_UC.Handle.ToInt32
        End Get
    End Property

So far so good...

Now I want to add this usercontrol to the toolbar, how do I actually do that? What am I supposed to write in the Config.esriaddinx file? Typically you declare a <command> and then reference that command in the <toolbar>
The only options when creating a command are <Button>,<Combobox>,<MultiItem>,<Tool> etc

How on Earth do I add a usercontrol to the AddIn toolbar?

Viewing all articles
Browse latest Browse all 1374

Trending Articles