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

Button displays caption not image on toolbar add-In

$
0
0
I created an Add-in using the ArcObjects SDK for .Net in Visual Studio 2010. Initially I just had one button on the toolbar. Later I decided to add another button. I added the the button manually in the Config.esriaddinx file. as shown below.

HTML Code:

<AddIn  language="CLR"
            library="SearchDBByLocationTool.dll"
            namespace="SearchDBByLocationTool">

    <ArcMap>
      <Commands>
        <Button  id="SearchDBByLocationTool_SearchDBByLocationButton"
                    class="SearchDBByLocationButton"
                    message="Searches the DB for any PDF, JPG, GIS data, or all three
                                  found within a geographic location"

                    caption="Search Database"
                    tip="Click to search database for geo-located data by a defined area
                          of interest"

                    category="Add-In Controls"
                    image="Images\SearchDBByLocationButton.png"/>

        <Button  id="SearchDBByLocationTool_AddResultLayersToMapButton"
                    class ="AddResultLayersToMapButton"
                    message="Takes the selected features from the results of the database                            search and adds the resulting GIS layer"
                    caption="Add Selected Result"
                    tip="Click to add the selected GIS layers to the map (only on GIS
                          data not pdf or photos)"

                    category="Add-In Controls"
                    image="Images\MapWithStarBlue32.png"/>

      </Commands>
        <Toolbars>
                <Toolbar  id ="SearchDBByLocationToolToolbar"
                            caption="Database Search"
                            showInitially="true">

                    <Items>
                      <Button refID="SearchDBByLocationTool_SearchDBByLocationButton"/>
                      <Button refID="SearchDBByLocationTool_AddResultLayersToMapButton"/>
                    </Items>
                </Toolbar>
        </Toolbars>
    </ArcMap>
  </AddIn>

My question is when I open up ArcMap why does my second button that I added manually to the Config.esriaddinx show the "Caption" instead of the "image" while the first button is displayed correctly? The first button has an image in the same folder as the second and its image shows on the button? What am I missing?

Viewing all articles
Browse latest Browse all 1374

Trending Articles