<?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 : ListBox - check on click</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Controls : ListBox - check on click]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Wed, 13 May 2026 00:07:42 +0000</pubDate>
  <lastBuildDate>Fri, 20 Jun 2008 14:02:57 +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=11117</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[ListBox - check on click :   jpbro wrote:I think the Click...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=11117&amp;PID=37109&amp;title=listbox-check-on-click#37109</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=3880">coffeemkr0</a><br /><strong>Subject:</strong> 11117<br /><strong>Posted:</strong> 20 June 2008 at 2:02pm<br /><br /><table width="99%"><tr><td class="BBquote"><img src="forum_images/quote_box.png" title="Originally posted by jpbro" alt="Originally posted by jpbro" style="vertical-align: text-bottom;" /> <strong>jpbro wrote:</strong><br /><br />I think the Click event is what you are looking for...try this:<BR><BR><table width="99%"><tr><td><pre class="BBcode"><BR>Private Sub ListBox1_Click()<BR>&nbsp;&nbsp; With Me.ListBox1<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .Checked(.ListIndex) = Not .Checked(.ListIndex)<BR>&nbsp;&nbsp; End With<BR>End Sub<BR></pre></td></tr></table><BR><BR><BR></td></tr></table> <DIV>&nbsp;</DIV><DIV>Haha, ListIndex, that is what I was missing :)&nbsp; Leave it to me to make something easy way too complicated.</DIV><DIV>&nbsp;</DIV><DIV>Anyways, here is the final solution I came up with in case someone else has this issue.</DIV><DIV>I added a rectangle that covers the check boxes.&nbsp; If the cursor is inside that rectangle then it does nothing since this is the user clicking on the check box instead of the item.</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV><DIV><table width="99%"><tr><td><pre class="BBcode"></DIV><DIV><FONT size=2></FONT><FONT color=#2b91af size=2><FONT size=2><P></FONT><FONT color=#0000ff size=2>private</FONT><FONT size=2> </FONT><FONT color=#0000ff size=2>void</FONT><FONT size=2> AxListBox_ClickEvent(</FONT><FONT color=#0000ff size=2>object</FONT><FONT size=2> sender, </FONT><FONT color=#2b91af size=2>EventArgs</FONT><FONT size=2> e)</P><P>{</P><DIV><FONT size=2><FONT size=2><P>&nbsp;&nbsp;&nbsp; AxXtremeSuiteControls.</FONT><FONT color=#2b91af size=2>AxListBox</FONT><FONT size=2> objListBox = (AxXtremeSuiteControls.</FONT><FONT color=#2b91af size=2>AxListBox</FONT><FONT size=2>)sender;</P><P></FONT><FONT color=#2b91af size=2>&nbsp;&nbsp;&nbsp; Rectangle</FONT><FONT size=2> r = </FONT><FONT color=#0000ff size=2>new</FONT><FONT size=2> </FONT><FONT color=#2b91af size=2>Rectangle</FONT><FONT size=2>(0, 0, 15, objListBox.Height);</P><P></FONT><FONT color=#0000ff size=2>&nbsp;&nbsp;&nbsp; if</FONT><FONT size=2> (!r.Contains(objListBox.PointToClient(</FONT><FONT color=#2b91af size=2>Cursor</FONT><FONT size=2>.Position)))</P><P>&nbsp;&nbsp;&nbsp; {</P><P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; objListBox.set_Checked(objListBox.ListIndex, !objListBox.get_Checked(objListBox.ListIndex));</P><P>&nbsp;&nbsp;&nbsp; }</P></FONT></FONT></FONT><FONT size=2></DIV><P>}</P></FONT></FONT><FONT size=2><DIV></DIV></pre></td></tr></table></FONT></DIV>]]>
   </description>
   <pubDate>Fri, 20 Jun 2008 14:02:57 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=11117&amp;PID=37109&amp;title=listbox-check-on-click#37109</guid>
  </item> 
  <item>
   <title><![CDATA[ListBox - check on click : I think the Click event is what...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=11117&amp;PID=37054&amp;title=listbox-check-on-click#37054</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2676">jpbro</a><br /><strong>Subject:</strong> 11117<br /><strong>Posted:</strong> 19 June 2008 at 10:13pm<br /><br />I think the Click event is what you are looking for...try this:<br><br><table width="99%"><tr><td><pre class="BBcode"><br>Private Sub ListBox1_Click()<br>&nbsp;&nbsp; With Me.ListBox1<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .Checked(.ListIndex) = Not .Checked(.ListIndex)<br>&nbsp;&nbsp; End With<br>End Sub<br></pre></td></tr></table><br><br><br>]]>
   </description>
   <pubDate>Thu, 19 Jun 2008 22:13:22 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=11117&amp;PID=37054&amp;title=listbox-check-on-click#37054</guid>
  </item> 
  <item>
   <title><![CDATA[ListBox - check on click : I was wondering if it is possible...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=11117&amp;PID=37050&amp;title=listbox-check-on-click#37050</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=3880">coffeemkr0</a><br /><strong>Subject:</strong> 11117<br /><strong>Posted:</strong> 19 June 2008 at 6:24pm<br /><br />I was wondering if it is possible with the XtremeListBox control to make it so that when a user selects an item it will also check/uncheck the check box for that item.<DIV>&nbsp;</DIV><DIV>I don't see any selected index changed event or any event that will basically tell me when an item is clicked.&nbsp; </DIV><DIV>&nbsp;</DIV><DIV>I originally thought I had solved the problem by simulating rectangles around each item in the list and then checking the mouse position in the mouse down event.</DIV><DIV>&nbsp;</DIV><DIV>However, this solution does not work if the user scrolls the list box and as far as I can tell, there is also no way to tell when the list box is scrolled.</DIV><DIV>&nbsp;</DIV><DIV>Is there any way to implement this?</DIV>]]>
   </description>
   <pubDate>Thu, 19 Jun 2008 18:24:54 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=11117&amp;PID=37050&amp;title=listbox-check-on-click#37050</guid>
  </item> 
 </channel>
</rss>