<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic IActiveViewEvents::ItemAdded in ArcObjects SDK Questions</title>
    <link>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-enable-a-tool-after-adding-the-layers-to/m-p/96698#M2551</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You can handle this by listening to IActiveViewEvents::ItemAdded and IActiveViewEvents::ItemDeleted events. Your validation code would go in the event handlers and would be a simple conditional statement to determine if the key layer has been added or removed.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here are a few docs that you may find useful:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://resources.esri.com/help/9.3/ArcGISDesktop/ArcObjects/esriCarto/IActiveViewEvents.htm"&gt;http://resources.esri.com/help/9.3/ArcGISDesktop/ArcObjects/esriCarto/IActiveViewEvents.htm&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://resources.esri.com/help/9.3/ArcGISDesktop/dotnet/12BF6F08-1B25-4002-9640-73D4EB0E6CED.htm"&gt;http://resources.esri.com/help/9.3/ArcGISDesktop/dotnet/12BF6F08-1B25-4002-9640-73D4EB0E6CED.htm&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;For the second link look at the Events topics.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hope this helps!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 20 Apr 2010 20:33:44 GMT</pubDate>
    <dc:creator>JohnHauck</dc:creator>
    <dc:date>2010-04-20T20:33:44Z</dc:date>
    <item>
      <title>how to enable a tool after adding the layers to arcmap</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-enable-a-tool-after-adding-the-layers-to/m-p/96697#M2550</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I added a combo box control to the arc map from .NET form ,by implementing the itoolcontrol interface.Here i need to enable the added combobox only after the layer is added to the arc map other wise it has to be disabled.At this instance only&amp;nbsp; combox has to maintain the objectids of the features in the particular layer.Please help me which event is used for this situation.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Thank you.....&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Apr 2010 08:54:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-enable-a-tool-after-adding-the-layers-to/m-p/96697#M2550</guid>
      <dc:creator>srinivasreddy</dc:creator>
      <dc:date>2010-04-20T08:54:10Z</dc:date>
    </item>
    <item>
      <title>IActiveViewEvents::ItemAdded</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-enable-a-tool-after-adding-the-layers-to/m-p/96698#M2551</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You can handle this by listening to IActiveViewEvents::ItemAdded and IActiveViewEvents::ItemDeleted events. Your validation code would go in the event handlers and would be a simple conditional statement to determine if the key layer has been added or removed.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here are a few docs that you may find useful:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://resources.esri.com/help/9.3/ArcGISDesktop/ArcObjects/esriCarto/IActiveViewEvents.htm"&gt;http://resources.esri.com/help/9.3/ArcGISDesktop/ArcObjects/esriCarto/IActiveViewEvents.htm&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://resources.esri.com/help/9.3/ArcGISDesktop/dotnet/12BF6F08-1B25-4002-9640-73D4EB0E6CED.htm"&gt;http://resources.esri.com/help/9.3/ArcGISDesktop/dotnet/12BF6F08-1B25-4002-9640-73D4EB0E6CED.htm&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;For the second link look at the Events topics.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hope this helps!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Apr 2010 20:33:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-enable-a-tool-after-adding-the-layers-to/m-p/96698#M2551</guid>
      <dc:creator>JohnHauck</dc:creator>
      <dc:date>2010-04-20T20:33:44Z</dc:date>
    </item>
    <item>
      <title>Enabled Property</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-enable-a-tool-after-adding-the-layers-to/m-p/96699#M2552</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I prefer to override the Enabled property of the BaseTool class.....&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The following example enables the tool only when a raster layer is added to the map.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; Public Overrides ReadOnly Property Enabled() As Boolean
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Get
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim i As Integer
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; For i = 0 To pMap.LayerCount - 1
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If TypeOf pMap.Layer(i) Is IRasterLayer Then
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MyBase.m_enabled = True
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Exit For
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Else
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MyBase.m_enabled = False
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End If
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Next i
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Return MyBase.Enabled
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End Get
&amp;nbsp;&amp;nbsp;&amp;nbsp; End Property
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 06:05:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-enable-a-tool-after-adding-the-layers-to/m-p/96699#M2552</guid>
      <dc:creator>JeremySury</dc:creator>
      <dc:date>2021-12-11T06:05:00Z</dc:date>
    </item>
    <item>
      <title>Re: how to enable a tool after adding the layers to arcmap</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-enable-a-tool-after-adding-the-layers-to/m-p/1488850#M20659</link>
      <description>&lt;P&gt;Could you share the Itoolcontrol implementation that you have done.&lt;/P&gt;</description>
      <pubDate>Tue, 11 Jun 2024 12:27:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-enable-a-tool-after-adding-the-layers-to/m-p/1488850#M20659</guid>
      <dc:creator>Kumaran</dc:creator>
      <dc:date>2024-06-11T12:27:08Z</dc:date>
    </item>
  </channel>
</rss>

