<?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: Scrollable GUI panels	</title>
	<atom:link href="https://undocumentedmatlab.com/articles/scrollable-gui-panels/feed" rel="self" type="application/rss+xml" />
	<link>https://undocumentedmatlab.com/articles/scrollable-gui-panels?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=scrollable-gui-panels</link>
	<description>Professional Matlab consulting, development and training</description>
	<lastBuildDate>Thu, 08 Oct 2020 09:28:17 +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/scrollable-gui-panels#comment-508953</link>

		<dc:creator><![CDATA[Yair Altman]]></dc:creator>
		<pubDate>Thu, 08 Oct 2020 09:28:17 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=7824#comment-508953</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://undocumentedmatlab.com/articles/scrollable-gui-panels#comment-508951&quot;&gt;Eivind&lt;/a&gt;.

&lt;code&gt;jPanel1.setParent(jPanel2)&lt;/code&gt; will reparent jPanel1 (and similarly any Java component/container) inside jPanel2 (any Java container).
While this might work, it seems to me to be an overly-complex solution. A much simpler one is to set your jScrollPanel&#039;s &lt;code&gt;MouseWheelMovedCallback&lt;/code&gt; callback as explained here: http://undocumentedmatlab.com/articles/uicontrol-callbacks]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://undocumentedmatlab.com/articles/scrollable-gui-panels#comment-508951">Eivind</a>.</p>
<p><code>jPanel1.setParent(jPanel2)</code> will reparent jPanel1 (and similarly any Java component/container) inside jPanel2 (any Java container).<br />
While this might work, it seems to me to be an overly-complex solution. A much simpler one is to set your jScrollPanel&#8217;s <code>MouseWheelMovedCallback</code> callback as explained here: <a href="http://undocumentedmatlab.com/articles/uicontrol-callbacks" rel="ugc">http://undocumentedmatlab.com/articles/uicontrol-callbacks</a></p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Eivind		</title>
		<link>https://undocumentedmatlab.com/articles/scrollable-gui-panels#comment-508951</link>

		<dc:creator><![CDATA[Eivind]]></dc:creator>
		<pubDate>Wed, 07 Oct 2020 18:38:56 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=7824#comment-508951</guid>

					<description><![CDATA[Hi, 

Thanks for a great function! I was trying to put the main panel of my figure into a scrollable panel with the goal of zooming into the panel using shift+scroll and scrolling up and down using normal scroll. I realised quickly however, that the zoom function I added to the WindowScrollWheelFcn property of my figure does not execute on scrolling because the scrolling is captured by the scroll panel. 

I&#039;m not familiar enough with java to find out how to capture the scroll events and &quot;re-route&quot; them to my figure if the shift button is down, but I thought of an easier solution, i.e to detach the main panel from the scroll panel whenever I press the shift button and reattach it when I release the shift button. However, I got stuck here too, as I have no idea what to reparent the &quot;jParent&quot; to in what would be the reverse of this:
&lt;pre lang=&quot;matlab&quot;&gt;jPanel = hPanel.JavaFrame.getGUIDEView;
jParent = jPanel.getParent;
jScrollPanel = javaObjectEDT(javax.swing.JScrollPane(jParent));&lt;/pre&gt;

I guess what I am trying to write is a detachScrollPanel function (similar to the  decorateFig/undecorateFig functions). Would appreciate any help!]]></description>
			<content:encoded><![CDATA[<p>Hi, </p>
<p>Thanks for a great function! I was trying to put the main panel of my figure into a scrollable panel with the goal of zooming into the panel using shift+scroll and scrolling up and down using normal scroll. I realised quickly however, that the zoom function I added to the WindowScrollWheelFcn property of my figure does not execute on scrolling because the scrolling is captured by the scroll panel. </p>
<p>I&#8217;m not familiar enough with java to find out how to capture the scroll events and &#8220;re-route&#8221; them to my figure if the shift button is down, but I thought of an easier solution, i.e to detach the main panel from the scroll panel whenever I press the shift button and reattach it when I release the shift button. However, I got stuck here too, as I have no idea what to reparent the &#8220;jParent&#8221; to in what would be the reverse of this:</p>
<pre lang="matlab">jPanel = hPanel.JavaFrame.getGUIDEView;
jParent = jPanel.getParent;
jScrollPanel = javaObjectEDT(javax.swing.JScrollPane(jParent));</pre>
<p>I guess what I am trying to write is a detachScrollPanel function (similar to the  decorateFig/undecorateFig functions). Would appreciate any help!</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: David Sampson		</title>
		<link>https://undocumentedmatlab.com/articles/scrollable-gui-panels#comment-434170</link>

		<dc:creator><![CDATA[David Sampson]]></dc:creator>
		<pubDate>Sat, 04 Aug 2018 08:24:36 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=7824#comment-434170</guid>

					<description><![CDATA[See also uix.ScrollingPanel in &lt;a href=&quot;https://www.mathworks.com/matlabcentral/fileexchange/47982-gui-layout-toolbox&quot; rel=&quot;nofollow&quot;&gt;GUI Layout Toolbox&lt;/a&gt;.  This works for figures (not uifigures) from R2014b onwards.]]></description>
			<content:encoded><![CDATA[<p>See also uix.ScrollingPanel in <a href="https://www.mathworks.com/matlabcentral/fileexchange/47982-gui-layout-toolbox" rel="nofollow">GUI Layout Toolbox</a>.  This works for figures (not uifigures) from R2014b onwards.</p>
]]></content:encoded>
		
			</item>
	</channel>
</rss>
