<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="RSS_xslt_style.asp" version="1.0" ?>
<rss version="2.0" xmlns:WebWizForums="https://syndication.webwiz.net/rss_namespace/">
 <channel>
  <title>Codejock Developer Community : Index param in AddItem Method</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Command Bars : Index param in AddItem Method]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Wed, 13 May 2026 06:56:13 +0000</pubDate>
  <lastBuildDate>Thu, 05 Feb 2004 20:14:45 +0000</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 12.04</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>forum.codejock.com/RSS_post_feed.asp?TID=390</WebWizForums:feedURL>
  <image>
   <title><![CDATA[Codejock Developer Community]]></title>
   <url>http://forum.codejock.com/forum_images/codejock-logo.gif</url>
   <link>http://forum.codejock.com/</link>
  </image>
  <item>
   <title><![CDATA[Index param in AddItem Method : Yep, I see what you are saying. I...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=390&amp;PID=968&amp;title=index-param-in-additem-method#968</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=229">robs</a><br /><strong>Subject:</strong> 390<br /><strong>Posted:</strong> 05 February 2004 at 8:14pm<br /><br /><P>Yep, I see what you are saying.</P><P>I think what I said before is correct, with an exception:</P><P>c.AddItem "Test2",2 will add "Test2" before item 2 if it exists-however, if it does not then it won't add it at all.</P><P>I agree with you that the combo boxes are lacking. One would expect them to behave like a standard combo box.</P><P>Perhaps the folks at Codejock with recognize this as a bug, or consider it for a future enhancement.</P><P>Would you consider using a custom control (standard ComboBox) instead? Then you should have the functionality of a standard combobox. It's not the best sollution but...</P><P>Drop a combo on your form (Combo1)</P><P>Dim mCustom&nbsp;&nbsp;&nbsp;&nbsp; As ICommandBarControlCustom</P><P>Set mCustom = CommandBars.Add(xtpControlCustom, id, label)<BR>With Combo1<BR>&nbsp;&nbsp; mCustom.Handle = .hWnd<BR>&nbsp;&nbsp; .AddItem "Item1"<BR>&nbsp;&nbsp;&nbsp; .AddItem "Item2"<BR>&nbsp;&nbsp;&nbsp; .ListIndex = 1<BR>End With</P><P>&nbsp;</P><span style="font-size:10px"><br /><br />Edited by robs</span>]]>
   </description>
   <pubDate>Thu, 05 Feb 2004 20:14:45 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=390&amp;PID=968&amp;title=index-param-in-additem-method#968</guid>
  </item> 
  <item>
   <title><![CDATA[Index param in AddItem Method : OK, then why don&amp;#039;t any of...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=390&amp;PID=967&amp;title=index-param-in-additem-method#967</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=259">jamauss</a><br /><strong>Subject:</strong> 390<br /><strong>Posted:</strong> 05 February 2004 at 7:19pm<br /><br /><P>OK, then why don't any of the items in my list appear?</P><P>Try adding items using index values like 3, 4, and 5 (in that order) and you'll see that no items appear in your combo box.</P><P>Also - there is no "ItemData"-type property for the combo boxes then so you can associate ID values with combo list items? That's practically the whole purpose for having combo boxes. Some functionality is severely lacking here.</P>]]>
   </description>
   <pubDate>Thu, 05 Feb 2004 19:19:09 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=390&amp;PID=967&amp;title=index-param-in-additem-method#967</guid>
  </item> 
  <item>
   <title><![CDATA[Index param in AddItem Method : jamauss, I think this is normal....]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=390&amp;PID=940&amp;title=index-param-in-additem-method#940</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=229">robs</a><br /><strong>Subject:</strong> 390<br /><strong>Posted:</strong> 04 February 2004 at 9:09pm<br /><br /><P>jamauss,</P><P>I think this is normal. It appears that the 'index' parameter is like the 'before' parameter in a VB collection (although the object doesn't support named arguments).</P><P>&nbsp;c.AddItem "Test1", 1<BR>&nbsp;c.AddItem "Test2", 2<BR>&nbsp;c.AddItem "Test3", 2</P><P>Is like saying:</P><P>add Test1 before anything</P><P>add Test2 before the 2nd item (if it exists)</P><P>add Test3 before the 2nd item (if it exists)</P><P>So the list would be: Test1,Test3, Test2</P><P>&nbsp;</P><P>rob</P><span style="font-size:10px"><br /><br />Edited by robs</span>]]>
   </description>
   <pubDate>Wed, 04 Feb 2004 21:09:59 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=390&amp;PID=940&amp;title=index-param-in-additem-method#940</guid>
  </item> 
  <item>
   <title><![CDATA[Index param in AddItem Method : I am using the ActiveX XTremeCommandBars....]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=390&amp;PID=883&amp;title=index-param-in-additem-method#883</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=259">jamauss</a><br /><strong>Subject:</strong> 390<br /><strong>Posted:</strong> 27 January 2004 at 12:18pm<br /><br />I am using the ActiveX XTremeCommandBars. I am putting a combo box into my toolbar. When I call the AddItem method and pass a string and an index value, no items show up in my combo box unless &#091;index&#093; is 1 and then only goes 2, 3, 4 as I add more items. Why does it do this? Is it a requirements to only have sequential index values starting at 1?]]>
   </description>
   <pubDate>Tue, 27 Jan 2004 12:18:22 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=390&amp;PID=883&amp;title=index-param-in-additem-method#883</guid>
  </item> 
 </channel>
</rss>