<?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 Re: Hide a Toolbar Item? in ArcObjects SDK Questions</title>
    <link>https://community.esri.com/t5/arcobjects-sdk-questions/hide-a-toolbar-item/m-p/609453#M16326</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Did you look at ICommandItem?&amp;nbsp; The delete method just removes the command from the commandbar.&amp;nbsp; The docs indicate you can add that command back at a later time.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;That's Desktop stuff - I'm Engine only. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I did find a solution that worked. I instantiate a seperate toolbar and load all my commands into that toolbar in any order I want and then I share that toolbar's CommandPool with the UI toolbar. I can then load the UI toolbar however I want. Sure would be nice if I could just hide an item tho. Can't see why that has never been requested.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 07 Mar 2012 21:40:21 GMT</pubDate>
    <dc:creator>GeorgeFaraj</dc:creator>
    <dc:date>2012-03-07T21:40:21Z</dc:date>
    <item>
      <title>Hide a Toolbar Item?</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/hide-a-toolbar-item/m-p/609449#M16322</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;In an ArcEngine application, if I add a command (or tool) to a toolbar can I then hide that command (or tool)? &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I can do this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;
int itemIndex = toolbar.AddItem("esriControls.ControlsMapFullExtentCommand", 0, -1, false, 0, esriCommandStyles.esriCommandStyleIconOnly);
IToolbarItem item = toolbar.GetItem(elementTool);
&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But I see nothing in IToolbarItem that sets visibility.&amp;nbsp; Is this even possible?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Mar 2012 17:51:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/hide-a-toolbar-item/m-p/609449#M16322</guid>
      <dc:creator>GeorgeFaraj</dc:creator>
      <dc:date>2012-03-06T17:51:35Z</dc:date>
    </item>
    <item>
      <title>Re: Hide a Toolbar Item?</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/hide-a-toolbar-item/m-p/609450#M16323</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I didn't see the abillity to toggle visibility of a ToolbarItem in the API, other than removing the item from the Toolbar given an item index.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Mar 2012 03:28:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/hide-a-toolbar-item/m-p/609450#M16323</guid>
      <dc:creator>LeoDonahue</dc:creator>
      <dc:date>2012-03-07T03:28:05Z</dc:date>
    </item>
    <item>
      <title>Re: Hide a Toolbar Item?</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/hide-a-toolbar-item/m-p/609451#M16324</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;I didn't see the abillity to toggle visibility of a ToolbarItem in the API, other than removing the item from the Toolbar given an item index.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Uggggghhhhh! Now I have a chicken and egg problem. (I want to use a command index in a ToolbarMenu before it is created - I figured if I could load it first in the toolbar and then hide it that would solve my problem. So now I need 2 toolbars because 1 doesn't really work.)&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Mar 2012 13:53:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/hide-a-toolbar-item/m-p/609451#M16324</guid>
      <dc:creator>GeorgeFaraj</dc:creator>
      <dc:date>2012-03-07T13:53:19Z</dc:date>
    </item>
    <item>
      <title>Re: Hide a Toolbar Item?</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/hide-a-toolbar-item/m-p/609452#M16325</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Did you look at ICommandItem?&amp;nbsp; The delete method just removes the command from the commandbar.&amp;nbsp; The docs indicate you can add that command back at a later time.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Mar 2012 15:00:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/hide-a-toolbar-item/m-p/609452#M16325</guid>
      <dc:creator>LeoDonahue</dc:creator>
      <dc:date>2012-03-07T15:00:43Z</dc:date>
    </item>
    <item>
      <title>Re: Hide a Toolbar Item?</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/hide-a-toolbar-item/m-p/609453#M16326</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Did you look at ICommandItem?&amp;nbsp; The delete method just removes the command from the commandbar.&amp;nbsp; The docs indicate you can add that command back at a later time.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;That's Desktop stuff - I'm Engine only. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I did find a solution that worked. I instantiate a seperate toolbar and load all my commands into that toolbar in any order I want and then I share that toolbar's CommandPool with the UI toolbar. I can then load the UI toolbar however I want. Sure would be nice if I could just hide an item tho. Can't see why that has never been requested.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Mar 2012 21:40:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/hide-a-toolbar-item/m-p/609453#M16326</guid>
      <dc:creator>GeorgeFaraj</dc:creator>
      <dc:date>2012-03-07T21:40:21Z</dc:date>
    </item>
  </channel>
</rss>

