<?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: Smart listbox &#038; editbox scrollbars	</title>
	<atom:link href="https://undocumentedmatlab.com/articles/smart-listbox-editbox-scrollbars/feed" rel="self" type="application/rss+xml" />
	<link>https://undocumentedmatlab.com/articles/smart-listbox-editbox-scrollbars?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=smart-listbox-editbox-scrollbars</link>
	<description>Professional Matlab consulting, development and training</description>
	<lastBuildDate>Tue, 28 Nov 2017 16:29:45 +0000</lastBuildDate>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.7.2</generator>
	<item>
		<title>
		By: Yair Altman		</title>
		<link>https://undocumentedmatlab.com/articles/smart-listbox-editbox-scrollbars#comment-417047</link>

		<dc:creator><![CDATA[Yair Altman]]></dc:creator>
		<pubDate>Tue, 28 Nov 2017 16:29:45 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=6379#comment-417047</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://undocumentedmatlab.com/articles/smart-listbox-editbox-scrollbars#comment-416861&quot;&gt;Claudio&lt;/a&gt;.

@Claudio - your best bet is to set the callback not on the Java component&#039;s &lt;b&gt;ComponentResizedCallback&lt;/b&gt; but rather on the containing panel&#039;s &lt;b&gt;SizeChangedFcn&lt;/b&gt;. For example:

&lt;pre lang=&quot;matlab&quot;&gt;
% If the original control is a Java component placed using javacomponent():
[jhComponent, hContainer] = javacomponent(jComponent, ...);
set(hContainer, &#039;Units&#039;,&#039;normalized&#039;, &#039;SizeChangedFcn&#039;,cbFunc);

% If the original control is a Matlab component placed using uicontrol() etc.:
hPanel = uipanel(&#039;BorderType&#039;,&#039;none&#039;, &#039;SizeChangedFcn&#039;,cbFunc, ...);
hComponent = uicontrol(hPanel, ...)
&lt;/pre&gt;]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://undocumentedmatlab.com/articles/smart-listbox-editbox-scrollbars#comment-416861">Claudio</a>.</p>
<p>@Claudio &#8211; your best bet is to set the callback not on the Java component&#8217;s <b>ComponentResizedCallback</b> but rather on the containing panel&#8217;s <b>SizeChangedFcn</b>. For example:</p>
<pre lang="matlab">
% If the original control is a Java component placed using javacomponent():
[jhComponent, hContainer] = javacomponent(jComponent, ...);
set(hContainer, 'Units','normalized', 'SizeChangedFcn',cbFunc);

% If the original control is a Matlab component placed using uicontrol() etc.:
hPanel = uipanel('BorderType','none', 'SizeChangedFcn',cbFunc, ...);
hComponent = uicontrol(hPanel, ...)
</pre>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Claudio		</title>
		<link>https://undocumentedmatlab.com/articles/smart-listbox-editbox-scrollbars#comment-416861</link>

		<dc:creator><![CDATA[Claudio]]></dc:creator>
		<pubDate>Sat, 25 Nov 2017 00:30:03 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=6379#comment-416861</guid>

					<description><![CDATA[I&#039;m having trouble in R2016a. The code I used to change the scroll policy on a listbox is: 
&lt;pre lang=&quot;matlab&quot;&gt;
jS = findjobj(findobj(&#039;Tag&#039;,&#039;lbox&#039;));
jS.setVerticalScrollBarPolicy(21);
hjScrollPane = handle(jS,&#039;CallbackProperties&#039;);
set(hjScrollPane,&#039;ComponentResizedCallback&#039;,cbFunc);
&lt;/pre&gt;
Where cbFunc is defined as a handle to a function re applying the properties. Everything works fine (the callback is set fine and so on, I checked with findjobj GUI), until I resize the window, where the policy change reverts, as explained here. 

The problem seems to be that &quot;ComponentResizedCallback&quot; is not getting called, I tried for instance &lt;code&gt;cbFunc = @(h,e) disp(&#039;called&#039;);&lt;/code&gt; and it really isn&#039;t being called.]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m having trouble in R2016a. The code I used to change the scroll policy on a listbox is: </p>
<pre lang="matlab">
jS = findjobj(findobj('Tag','lbox'));
jS.setVerticalScrollBarPolicy(21);
hjScrollPane = handle(jS,'CallbackProperties');
set(hjScrollPane,'ComponentResizedCallback',cbFunc);
</pre>
<p>Where cbFunc is defined as a handle to a function re applying the properties. Everything works fine (the callback is set fine and so on, I checked with findjobj GUI), until I resize the window, where the policy change reverts, as explained here. </p>
<p>The problem seems to be that &#8220;ComponentResizedCallback&#8221; is not getting called, I tried for instance <code>cbFunc = @(h,e) disp('called');</code> and it really isn&#8217;t being called.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Yair Altman		</title>
		<link>https://undocumentedmatlab.com/articles/smart-listbox-editbox-scrollbars#comment-374926</link>

		<dc:creator><![CDATA[Yair Altman]]></dc:creator>
		<pubDate>Sat, 23 Apr 2016 17:01:00 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=6379#comment-374926</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://undocumentedmatlab.com/articles/smart-listbox-editbox-scrollbars#comment-374909&quot;&gt;Collin&lt;/a&gt;.

@Collin - use the &lt;a href=&quot;http://undocumentedmatlab.com/blog/checkclass&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;&lt;i&gt;&lt;b&gt;checkClass&lt;/b&gt;&lt;/i&gt; utility&lt;/a&gt;]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://undocumentedmatlab.com/articles/smart-listbox-editbox-scrollbars#comment-374909">Collin</a>.</p>
<p>@Collin &#8211; use the <a href="http://undocumentedmatlab.com/blog/checkclass" target="_blank" rel="nofollow"><i><b>checkClass</b></i> utility</a></p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Collin		</title>
		<link>https://undocumentedmatlab.com/articles/smart-listbox-editbox-scrollbars#comment-374909</link>

		<dc:creator><![CDATA[Collin]]></dc:creator>
		<pubDate>Sat, 23 Apr 2016 11:46:39 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=6379#comment-374909</guid>

					<description><![CDATA[Yair,

Can you tell me what the constructor syntax for a com.mathworks.mlwidgets.cwd.CwdDisplayPanel is, or how to go about determining it?

Collin]]></description>
			<content:encoded><![CDATA[<p>Yair,</p>
<p>Can you tell me what the constructor syntax for a com.mathworks.mlwidgets.cwd.CwdDisplayPanel is, or how to go about determining it?</p>
<p>Collin</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Yair Altman		</title>
		<link>https://undocumentedmatlab.com/articles/smart-listbox-editbox-scrollbars#comment-374801</link>

		<dc:creator><![CDATA[Yair Altman]]></dc:creator>
		<pubDate>Thu, 21 Apr 2016 20:40:50 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=6379#comment-374801</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://undocumentedmatlab.com/articles/smart-listbox-editbox-scrollbars#comment-374799&quot;&gt;Matthew Hopcroft&lt;/a&gt;.

@Matthew - put it in the OutputFcn - the underlying Java component might still not be available in the OpeningFcn.]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://undocumentedmatlab.com/articles/smart-listbox-editbox-scrollbars#comment-374799">Matthew Hopcroft</a>.</p>
<p>@Matthew &#8211; put it in the OutputFcn &#8211; the underlying Java component might still not be available in the OpeningFcn.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Matthew Hopcroft		</title>
		<link>https://undocumentedmatlab.com/articles/smart-listbox-editbox-scrollbars#comment-374799</link>

		<dc:creator><![CDATA[Matthew Hopcroft]]></dc:creator>
		<pubDate>Thu, 21 Apr 2016 20:31:04 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=6379#comment-374799</guid>

					<description><![CDATA[Interesting post and thank you for uploading smart_scrollbars.
If you developed a gui with GUIDE, where would you put the call to smart_scrollbars? In the OpeningFcn?]]></description>
			<content:encoded><![CDATA[<p>Interesting post and thank you for uploading smart_scrollbars.<br />
If you developed a gui with GUIDE, where would you put the call to smart_scrollbars? In the OpeningFcn?</p>
]]></content:encoded>
		
			</item>
	</channel>
</rss>
