<?xml version="1.0" encoding="UTF-8"?><rss
version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
> <channel><title>Comments on: Setting listbox mouse actions</title> <atom:link href="http://undocumentedmatlab.com/blog/setting-listbox-mouse-actions/feed/" rel="self" type="application/rss+xml" /><link>http://undocumentedmatlab.com/blog/setting-listbox-mouse-actions/</link> <description>Charting Matlab's unsupported hidden underbelly</description> <lastBuildDate>Thu, 09 Feb 2012 09:23:08 +0000</lastBuildDate> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.1.1</generator> <item><title>By: Yair Altman</title><link>http://undocumentedmatlab.com/blog/setting-listbox-mouse-actions/#comment-26027</link> <dc:creator>Yair Altman</dc:creator> <pubDate>Thu, 16 Dec 2010 23:00:48 +0000</pubDate> <guid
isPermaLink="false">http://undocumentedmatlab.com/?p=503#comment-26027</guid> <description>@Dan - you could try placing &lt;b&gt;&lt;i&gt;figure(gcf)&lt;/i&gt;&lt;/b&gt; in your jListbox&#039;s &lt;b&gt;MouseExitedCallback&lt;/b&gt; code. This will transfer the focus to the figure, and hopefully remove the focus from the listbox.</description> <content:encoded><![CDATA[<p>@Dan &#8211; you could try placing <b><i>figure(gcf)</i></b> in your jListbox&#8217;s <b>MouseExitedCallback</b> code. This will transfer the focus to the figure, and hopefully remove the focus from the listbox.</p> ]]></content:encoded> </item> <item><title>By: Dan</title><link>http://undocumentedmatlab.com/blog/setting-listbox-mouse-actions/#comment-26025</link> <dc:creator>Dan</dc:creator> <pubDate>Thu, 16 Dec 2010 22:42:42 +0000</pubDate> <guid
isPermaLink="false">http://undocumentedmatlab.com/?p=503#comment-26025</guid> <description>@YairGood evening.I have put in practice your advice and by using the MouseWheelMovedCallback you describe above, it is easy to have the mouse wheel scrolling the list as desired, either by issuing the jListbox.requestFocus() you suggest or by using the Matlab builtin uicontrol(hListbox) function as each of them put the list in focus. Do you think there is an easy way to release the focus (other than clicking outside) and stop the mouse wheel scrolling the list, once the mouse is moved outside the listbox boundaries?ThanksDan</description> <content:encoded><![CDATA[<p>@Yair</p><p>Good evening.</p><p>I have put in practice your advice and by using the MouseWheelMovedCallback you describe above, it is easy to have the mouse wheel scrolling the list as desired, either by issuing the jListbox.requestFocus() you suggest or by using the Matlab builtin uicontrol(hListbox) function as each of them put the list in focus. Do you think there is an easy way to release the focus (other than clicking outside) and stop the mouse wheel scrolling the list, once the mouse is moved outside the listbox boundaries?</p><p>Thanks</p><p>Dan</p> ]]></content:encoded> </item> <item><title>By: Dan</title><link>http://undocumentedmatlab.com/blog/setting-listbox-mouse-actions/#comment-25914</link> <dc:creator>Dan</dc:creator> <pubDate>Wed, 15 Dec 2010 21:24:45 +0000</pubDate> <guid
isPermaLink="false">http://undocumentedmatlab.com/?p=503#comment-25914</guid> <description>Thank you for your advice.I&#039;ll get to it right away. I am not a &quot;pro&quot; programmer and I&#039;ll try to figure out how to proceed from your trace.Best regards</description> <content:encoded><![CDATA[<p>Thank you for your advice.</p><p>I&#8217;ll get to it right away. I am not a &#8220;pro&#8221; programmer and I&#8217;ll try to figure out how to proceed from your trace.</p><p>Best regards</p> ]]></content:encoded> </item> <item><title>By: Yair Altman</title><link>http://undocumentedmatlab.com/blog/setting-listbox-mouse-actions/#comment-25912</link> <dc:creator>Yair Altman</dc:creator> <pubDate>Wed, 15 Dec 2010 21:08:36 +0000</pubDate> <guid
isPermaLink="false">http://undocumentedmatlab.com/?p=503#comment-25912</guid> <description>@Dan - thanks for the feedback.Wheel scrolling can easily be processed by setting jListbox&#039;s &lt;b&gt;MouseWheelMovedCallback&lt;/b&gt; property to a Matlab callback function.I&#039;m not sure whether Java raises this event if the listbox is not focused. If so, then all you need to do is to trap &lt;b&gt;MouseEnteredCallback&lt;/b&gt; and within its callback function call jListbox.&lt;i&gt;requestFocus()&lt;/i&gt;. Subsequent mouse wheel events should be raised since the listbox will gain focus immediately upon mouse entry, similar to the X-Windows behavior.</description> <content:encoded><![CDATA[<p>@Dan &#8211; thanks for the feedback.</p><p>Wheel scrolling can easily be processed by setting jListbox&#8217;s <b>MouseWheelMovedCallback</b> property to a Matlab callback function.</p><p>I&#8217;m not sure whether Java raises this event if the listbox is not focused. If so, then all you need to do is to trap <b>MouseEnteredCallback</b> and within its callback function call jListbox.<i>requestFocus()</i>. Subsequent mouse wheel events should be raised since the listbox will gain focus immediately upon mouse entry, similar to the X-Windows behavior.</p> ]]></content:encoded> </item> <item><title>By: Dan</title><link>http://undocumentedmatlab.com/blog/setting-listbox-mouse-actions/#comment-25910</link> <dc:creator>Dan</dc:creator> <pubDate>Wed, 15 Dec 2010 20:27:32 +0000</pubDate> <guid
isPermaLink="false">http://undocumentedmatlab.com/?p=503#comment-25910</guid> <description>Dear Yair, thank you very much for the time and effort you put in this project. There was really the need of it, as for many users that do not know Java, customizing Matlab GUIs is really an uphill task.Related to your post, I would like to ask you how it would be possible to enable mouse wheel scrolling of a listbox, when the pointer hovers within the listbox limits, that is, without first select (focus) the lixtbox by mouse clicking or other means of selection.The behavior I am trying to replicate is really standard nowadays with listboxes (particularly on the net), and I believe, and quite &quot;natural&quot; too!Thank you very much in advance and for your help and congratulations for your site.RegardsDan</description> <content:encoded><![CDATA[<p>Dear Yair, thank you very much for the time and effort you put in this project. There was really the need of it, as for many users that do not know Java, customizing Matlab GUIs is really an uphill task.</p><p>Related to your post, I would like to ask you how it would be possible to enable mouse wheel scrolling of a listbox, when the pointer hovers within the listbox limits, that is, without first select (focus) the lixtbox by mouse clicking or other means of selection.</p><p>The behavior I am trying to replicate is really standard nowadays with listboxes (particularly on the net), and I believe, and quite &#8220;natural&#8221; too!</p><p>Thank you very much in advance and for your help and congratulations for your site.</p><p>Regards</p><p>Dan</p> ]]></content:encoded> </item> <item><title>By: Teresa Hall</title><link>http://undocumentedmatlab.com/blog/setting-listbox-mouse-actions/#comment-18023</link> <dc:creator>Teresa Hall</dc:creator> <pubDate>Fri, 17 Sep 2010 18:52:29 +0000</pubDate> <guid
isPermaLink="false">http://undocumentedmatlab.com/?p=503#comment-18023</guid> <description>Thanks so much for this, it is exactly what I was looking for!</description> <content:encoded><![CDATA[<p>Thanks so much for this, it is exactly what I was looking for!</p> ]]></content:encoded> </item> <item><title>By: Yair Altman</title><link>http://undocumentedmatlab.com/blog/setting-listbox-mouse-actions/#comment-17948</link> <dc:creator>Yair Altman</dc:creator> <pubDate>Thu, 16 Sep 2010 18:03:32 +0000</pubDate> <guid
isPermaLink="false">http://undocumentedmatlab.com/?p=503#comment-17948</guid> <description>@Patrik - this indicates that for some reason your jScrollPane is an invalid handle when you run the relevant code. Most probably it is not visible onscreen for some reason.</description> <content:encoded><![CDATA[<p>@Patrik &#8211; this indicates that for some reason your jScrollPane is an invalid handle when you run the relevant code. Most probably it is not visible onscreen for some reason.</p> ]]></content:encoded> </item> <item><title>By: Patrik</title><link>http://undocumentedmatlab.com/blog/setting-listbox-mouse-actions/#comment-17915</link> <dc:creator>Patrik</dc:creator> <pubDate>Thu, 16 Sep 2010 10:36:54 +0000</pubDate> <guid
isPermaLink="false">http://undocumentedmatlab.com/?p=503#comment-17915</guid> <description>Hello,Tanks for a very nice tutorial, but when I run the line&lt;pre lang=&quot;matlab&quot;&gt;
jListbox = jScrollPane.getViewport.getComponent(0);
&lt;/pre&gt; I get the error:No appropriate method, property, or field getViewport for class
handle.handle.Error in ==&gt; rightClickTest at 10
jListbox = jScrollPane.getViewport.getComponent(0);I use Matlab version 7.9 (R2009b). Any idea what is wrong and is it easy to fix?</description> <content:encoded><![CDATA[<p>Hello,</p><p>Tanks for a very nice tutorial, but when I run the line</p><div
class="wp_syntax"><div
class="code"><pre class="matlab" style="font-family:monospace;">   jListbox = jScrollPane.<span style="">getViewport</span>.<span style="">getComponent</span><span style="color: #080;">&#40;</span><span style="color: #33f;">0</span><span style="color: #080;">&#41;</span>;</pre></div></div><p> I get the error:</p><p> No appropriate method, property, or field getViewport for class<br
/> handle.handle.</p><p>Error in ==&gt; rightClickTest at 10<br
/> jListbox = jScrollPane.getViewport.getComponent(0);</p><p>I use Matlab version 7.9 (R2009b). Any idea what is wrong and is it easy to fix?</p> ]]></content:encoded> </item> <item><title>By: Yair Altman</title><link>http://undocumentedmatlab.com/blog/setting-listbox-mouse-actions/#comment-2651</link> <dc:creator>Yair Altman</dc:creator> <pubDate>Tue, 15 Sep 2009 13:31:45 +0000</pubDate> <guid
isPermaLink="false">http://undocumentedmatlab.com/?p=503#comment-2651</guid> <description>Thanks Aurélien - I fixed the post accordingly</description> <content:encoded><![CDATA[<p>Thanks Aurélien &#8211; I fixed the post accordingly</p> ]]></content:encoded> </item> <item><title>By: Aurélien Queffurust</title><link>http://undocumentedmatlab.com/blog/setting-listbox-mouse-actions/#comment-2649</link> <dc:creator>Aurélien Queffurust</dc:creator> <pubDate>Tue, 15 Sep 2009 12:42:10 +0000</pubDate> <guid
isPermaLink="false">http://undocumentedmatlab.com/?p=503#comment-2649</guid> <description>oups I forgot to make the change in my previous comment : eventdata into jEventdataThe first 2 lines should be :
&lt;pre lang=&quot;matlab&quot;&gt;
function mousePressedCallback(jListbox, jEventData, hListbox, jmenu)
if jEventData.isMetaDown
&lt;/pre&gt;</description> <content:encoded><![CDATA[<p>oups I forgot to make the change in my previous comment : eventdata into jEventdata</p><p>The first 2 lines should be :</p><div
class="wp_syntax"><div
class="code"><pre class="matlab" style="font-family:monospace;"><span style="color: #0000FF;">function</span> mousePressedCallback<span style="color: #080;">&#40;</span>jListbox, jEventData, hListbox, jmenu<span style="color: #080;">&#41;</span>
   <span style="color: #0000FF;">if</span> jEventData.<span style="">isMetaDown</span></pre></div></div>]]></content:encoded> </item> </channel> </rss>

<!-- W3 Total Cache: Minify debug info:
Engine:             disk: basic
Theme:              b7666
Template:           single
-->
<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Served from: undocumentedmatlab.com @ 2012-02-09 05:23:40 -->

<!-- W3 Total Cache: Page cache debug info:
Engine:             disk: enhanced
Cache key:          blog/setting-listbox-mouse-actions/feed/_index.xml_gzip
Caching:            enabled
Status:             not cached
Creation Time:      0.790s
Header info:
X-Pingback:         http://undocumentedmatlab.com/blog/xmlrpc.php
Set-Cookie:         wpgb_visit_last_php-default=1328790220; expires=Fri, 08-Feb-2013 12:23:40 GMT; path=/
Link:               <http://undocumentedmatlab.com/?p=503>; rel=shortlink
Content-Type:       text/xml; charset=UTF-8
Last-Modified:      Thu, 09 Feb 2012 12:23:40 GMT
Vary:               Accept-Encoding, Cookie
Expires:            Thu, 09 Feb 2012 13:23:40 GMT
Pragma:             public
Cache-Control:      public, must-revalidate, proxy-revalidate
Etag:               2f0b2249b07c82e6c2685450e22a1cba
Content-Encoding:   gzip
-->
