<?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 Unable to get combobox in ArcObjects SDK Questions</title>
    <link>https://community.esri.com/t5/arcobjects-sdk-questions/unable-to-get-combobox/m-p/1253207#M20570</link>
    <description>&lt;P&gt;Hi, I have created a tool bar with a command button and a combobox using ArcObjects dotnet. For combobox I am implementing Basecommand, and IComboBox. Now I need to get the the combobox from tool bar. I am able to get CommandItem from toolbar but unable to cast the commandItem to Combobox. Any help or code sample in this regard will be greatly appreciated.&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;</description>
    <pubDate>Tue, 31 Jan 2023 10:00:47 GMT</pubDate>
    <dc:creator>SurajJha1</dc:creator>
    <dc:date>2023-01-31T10:00:47Z</dc:date>
    <item>
      <title>Unable to get combobox</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/unable-to-get-combobox/m-p/1253207#M20570</link>
      <description>&lt;P&gt;Hi, I have created a tool bar with a command button and a combobox using ArcObjects dotnet. For combobox I am implementing Basecommand, and IComboBox. Now I need to get the the combobox from tool bar. I am able to get CommandItem from toolbar but unable to cast the commandItem to Combobox. Any help or code sample in this regard will be greatly appreciated.&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Tue, 31 Jan 2023 10:00:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/unable-to-get-combobox/m-p/1253207#M20570</guid>
      <dc:creator>SurajJha1</dc:creator>
      <dc:date>2023-01-31T10:00:47Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to get combobox</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/unable-to-get-combobox/m-p/1253371#M20571</link>
      <description>&lt;P&gt;There is not enough information to tell what you are trying to do.&amp;nbsp; In your tool, you should be able to access the combo box data directly.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;string selecteddata = myComboBox.Text;&amp;nbsp; &amp;nbsp; //or myComboBox.SelectedItem.ToString();&lt;/P&gt;&lt;P&gt;You will not be able to access the combo box outside of the tool.&amp;nbsp; Instead, when someone selects something, you will need to create an event in your tool that pushes the information to a place or property where that other program can find it.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Good Luck&lt;/P&gt;&lt;P&gt;Brent&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 31 Jan 2023 15:49:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/unable-to-get-combobox/m-p/1253371#M20571</guid>
      <dc:creator>BrentHoskisson</dc:creator>
      <dc:date>2023-01-31T15:49:46Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to get combobox</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/unable-to-get-combobox/m-p/1254213#M20573</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;You need to get ICommand from ICommandItem and then tocast it to your control class. For example my control class is :&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;    public partial class myComboboxControl
        : UserControl, ICommand, IToolControl, ImyComboboxControl
    {
       // class code here
    }&lt;/LI-CODE&gt;&lt;P&gt;Then to get my control I use code below:&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;                ICommand comm = pCommItem.Command;
                if (comm is myComboboxControl)
                {
                    myComboboxControl myCombobox = comm as myComboboxControl;
                    // call myCombobox public method
                }&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 02 Feb 2023 06:32:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/unable-to-get-combobox/m-p/1254213#M20573</guid>
      <dc:creator>GKmieliauskas</dc:creator>
      <dc:date>2023-02-02T06:32:24Z</dc:date>
    </item>
  </channel>
</rss>

