<?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: Matlab toolstrip – part 2 (ToolGroup App)	</title>
	<atom:link href="https://undocumentedmatlab.com/articles/matlab-toolstrip-part-2-toolgroup-app/feed" rel="self" type="application/rss+xml" />
	<link>https://undocumentedmatlab.com/articles/matlab-toolstrip-part-2-toolgroup-app?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=matlab-toolstrip-part-2-toolgroup-app</link>
	<description>Professional Matlab consulting, development and training</description>
	<lastBuildDate>Tue, 24 Jan 2023 03:20:19 +0000</lastBuildDate>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.7.2</generator>
	<item>
		<title>
		By: K		</title>
		<link>https://undocumentedmatlab.com/articles/matlab-toolstrip-part-2-toolgroup-app#comment-518931</link>

		<dc:creator><![CDATA[K]]></dc:creator>
		<pubDate>Tue, 24 Jan 2023 03:20:19 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=8059#comment-518931</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://undocumentedmatlab.com/articles/matlab-toolstrip-part-2-toolgroup-app#comment-471983&quot;&gt;Yair Altman&lt;/a&gt;.

Is there a way to programmatically manage which figure gets placed where? Let&#039;s say I have 5 figures docked, and I split it into 2 x 1, I want to place 3 specific figures on the &#039;top row&#039;, and 2 specific figures on the &#039;bottom row&#039;. I&#039;ve had no luck finding any settings to dock to a specific tile pane, all figures are docked to the ToolGroup app/Group, then it&#039;s being split up by some logic from there. 
This becomes more problematic if I&#039;m modifying dimensions and merging columns. So I want row 1 to span 2 columns, and row 2 to have 2 separate columns. Sometimes this works fine, other times I can see figures just disappear, they&#039;re still there via their handle checks but somehow invisible and I can&#039;t get them back into a pane or appear anywhere. Some type of &#039;assign figure to pane&#039; would be extremely useful. I&#039;ll keep searching...]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://undocumentedmatlab.com/articles/matlab-toolstrip-part-2-toolgroup-app#comment-471983">Yair Altman</a>.</p>
<p>Is there a way to programmatically manage which figure gets placed where? Let&#8217;s say I have 5 figures docked, and I split it into 2 x 1, I want to place 3 specific figures on the &#8216;top row&#8217;, and 2 specific figures on the &#8216;bottom row&#8217;. I&#8217;ve had no luck finding any settings to dock to a specific tile pane, all figures are docked to the ToolGroup app/Group, then it&#8217;s being split up by some logic from there.<br />
This becomes more problematic if I&#8217;m modifying dimensions and merging columns. So I want row 1 to span 2 columns, and row 2 to have 2 separate columns. Sometimes this works fine, other times I can see figures just disappear, they&#8217;re still there via their handle checks but somehow invisible and I can&#8217;t get them back into a pane or appear anywhere. Some type of &#8216;assign figure to pane&#8217; would be extremely useful. I&#8217;ll keep searching&#8230;</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Yair Altman		</title>
		<link>https://undocumentedmatlab.com/articles/matlab-toolstrip-part-2-toolgroup-app#comment-515503</link>

		<dc:creator><![CDATA[Yair Altman]]></dc:creator>
		<pubDate>Thu, 27 Oct 2022 14:14:19 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=8059#comment-515503</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://undocumentedmatlab.com/articles/matlab-toolstrip-part-2-toolgroup-app#comment-515452&quot;&gt;Kevin&lt;/a&gt;.

&lt;pre lang=&quot;matlab&quot;&gt;
titleStr = char(hFig.Name);
if strcmpi(hFig.NumberTitle,&#039;on&#039;)
   prefix = [&#039;Figure &#039; num2str(hFig.Number)];
   if ~isempty(titleStr)
      titleStr = [prefix &#039;: &#039; titleStr];
   else
      titleStr = prefix;
   end
end

jToolGroup = hFig.JavaFrame_I.getFigurePanelContainer.getTopLevelAncestor;
%alternative: =hToolGroup.SwingToolstrip.getComponent.getTopLevelAncestor;

jTab = findjobj(jToolGroup, &#039;class&#039;,&#039;DTDocumentTabs$Tab&#039;, &#039;property&#039;,{&#039;Text&#039;,titleStr});
if ~isempty(jTab)
   jCloseButton = jTab.getComponent(0);
   jTab.remove(jCloseButton);  % or: jCloseButton.setVisible(false)
   jTab.repaint
end
&lt;/pre&gt;]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://undocumentedmatlab.com/articles/matlab-toolstrip-part-2-toolgroup-app#comment-515452">Kevin</a>.</p>
<pre lang="matlab">
titleStr = char(hFig.Name);
if strcmpi(hFig.NumberTitle,'on')
   prefix = ['Figure ' num2str(hFig.Number)];
   if ~isempty(titleStr)
      titleStr = [prefix ': ' titleStr];
   else
      titleStr = prefix;
   end
end

jToolGroup = hFig.JavaFrame_I.getFigurePanelContainer.getTopLevelAncestor;
%alternative: =hToolGroup.SwingToolstrip.getComponent.getTopLevelAncestor;

jTab = findjobj(jToolGroup, 'class','DTDocumentTabs$Tab', 'property',{'Text',titleStr});
if ~isempty(jTab)
   jCloseButton = jTab.getComponent(0);
   jTab.remove(jCloseButton);  % or: jCloseButton.setVisible(false)
   jTab.repaint
end
</pre>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Kevin		</title>
		<link>https://undocumentedmatlab.com/articles/matlab-toolstrip-part-2-toolgroup-app#comment-515452</link>

		<dc:creator><![CDATA[Kevin]]></dc:creator>
		<pubDate>Fri, 21 Oct 2022 12:18:05 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=8059#comment-515452</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://undocumentedmatlab.com/articles/matlab-toolstrip-part-2-toolgroup-app#comment-515445&quot;&gt;Kevin&lt;/a&gt;.

Found it, findjobj utility was extremely helpful here, you can see there&#039;s a CloseButton object there, just need to set the visible parameter to false. Easily done in the findjobj utility, will take some more time to figure out how to do it programmatically as my java is not particularly strong. 
It&#039;s actually not part of the figure, it&#039;s a tab close button, need to figure out how to navigate to that object&#039;s location to set it. 
Very much appreciate all the material you&#039;ve put out on this, no way I would&#039;ve otherwise figured out (or known about) any of this!]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://undocumentedmatlab.com/articles/matlab-toolstrip-part-2-toolgroup-app#comment-515445">Kevin</a>.</p>
<p>Found it, findjobj utility was extremely helpful here, you can see there&#8217;s a CloseButton object there, just need to set the visible parameter to false. Easily done in the findjobj utility, will take some more time to figure out how to do it programmatically as my java is not particularly strong.<br />
It&#8217;s actually not part of the figure, it&#8217;s a tab close button, need to figure out how to navigate to that object&#8217;s location to set it.<br />
Very much appreciate all the material you&#8217;ve put out on this, no way I would&#8217;ve otherwise figured out (or known about) any of this!</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Kevin		</title>
		<link>https://undocumentedmatlab.com/articles/matlab-toolstrip-part-2-toolgroup-app#comment-515445</link>

		<dc:creator><![CDATA[Kevin]]></dc:creator>
		<pubDate>Thu, 20 Oct 2022 14:46:57 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=8059#comment-515445</guid>

					<description><![CDATA[I&#039;m interested in removing the (X) close button from figures added to the Toolstrip. There&#039;s a lot of functionality that can be programmed into docked figures, effectively becoming mini GUIs, but I don&#039;t want the user to be able to close them. Obviously I can write a close function that does nothing, but preferably the (X) icon is not present either. I can see Mathworks is doing this in the Solver Profiler tool used for Simulink, there are figures added to what appears to be a GUI constructed using ToolGroup features (you can probe tiled sections using gcf), but the figures do not have the (X) close button. Can&#039;t seem to find that property anywhere.]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m interested in removing the (X) close button from figures added to the Toolstrip. There&#8217;s a lot of functionality that can be programmed into docked figures, effectively becoming mini GUIs, but I don&#8217;t want the user to be able to close them. Obviously I can write a close function that does nothing, but preferably the (X) icon is not present either. I can see Mathworks is doing this in the Solver Profiler tool used for Simulink, there are figures added to what appears to be a GUI constructed using ToolGroup features (you can probe tiled sections using gcf), but the figures do not have the (X) close button. Can&#8217;t seem to find that property anywhere.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Prathep		</title>
		<link>https://undocumentedmatlab.com/articles/matlab-toolstrip-part-2-toolgroup-app#comment-509875</link>

		<dc:creator><![CDATA[Prathep]]></dc:creator>
		<pubDate>Tue, 02 Feb 2021 09:19:01 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=8059#comment-509875</guid>

					<description><![CDATA[Hi Yair,
        Thanks for your introduction on Matlab Toostrip. Is there any way to add  Matlab toolstrip for uifigures as you have done already for figure?]]></description>
			<content:encoded><![CDATA[<p>Hi Yair,<br />
        Thanks for your introduction on Matlab Toostrip. Is there any way to add  Matlab toolstrip for uifigures as you have done already for figure?</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Jacopo		</title>
		<link>https://undocumentedmatlab.com/articles/matlab-toolstrip-part-2-toolgroup-app#comment-507968</link>

		<dc:creator><![CDATA[Jacopo]]></dc:creator>
		<pubDate>Tue, 03 Dec 2019 10:46:31 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=8059#comment-507968</guid>

					<description><![CDATA[I&#039;m currently using Matlab 2019b.
For the application (software) I&#039;m currently developing, I would like to modify the toolstrip of a Simulink window I&#039;m opening using new_system/load_system, but I don&#039;t know how to retrieve the handle to that figure.
I found something useful in an old post (http://undocumentedmatlab.com/articles/accessing-the-matlab-editor), but here you retrieve the &quot;Editor&quot; window handle (and, looking at the group/client titles I cannot find anything related to simulink).
Does anyone know how to solve this problem?]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m currently using Matlab 2019b.<br />
For the application (software) I&#8217;m currently developing, I would like to modify the toolstrip of a Simulink window I&#8217;m opening using new_system/load_system, but I don&#8217;t know how to retrieve the handle to that figure.<br />
I found something useful in an old post (<a href="http://undocumentedmatlab.com/articles/accessing-the-matlab-editor" rel="ugc">http://undocumentedmatlab.com/articles/accessing-the-matlab-editor</a>), but here you retrieve the &#8220;Editor&#8221; window handle (and, looking at the group/client titles I cannot find anything related to simulink).<br />
Does anyone know how to solve this problem?</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Rohit		</title>
		<link>https://undocumentedmatlab.com/articles/matlab-toolstrip-part-2-toolgroup-app#comment-496735</link>

		<dc:creator><![CDATA[Rohit]]></dc:creator>
		<pubDate>Tue, 10 Sep 2019 14:41:43 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=8059#comment-496735</guid>

					<description><![CDATA[Is there any way to display &quot;Figure&#039;s default Toolbar&quot; when docked to &quot;ToolGroup&quot;? as it does when you use Matlab&#039;s default docking option.]]></description>
			<content:encoded><![CDATA[<p>Is there any way to display &#8220;Figure&#8217;s default Toolbar&#8221; when docked to &#8220;ToolGroup&#8221;? as it does when you use Matlab&#8217;s default docking option.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Thomas Satterly		</title>
		<link>https://undocumentedmatlab.com/articles/matlab-toolstrip-part-2-toolgroup-app#comment-476125</link>

		<dc:creator><![CDATA[Thomas Satterly]]></dc:creator>
		<pubDate>Wed, 24 Apr 2019 17:49:14 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=8059#comment-476125</guid>

					<description><![CDATA[Thanks for writing this series, I&#039;ve found using the ToolGroup very enjoyable in new lightweight apps. One issue/annoyance I&#039;ve noticed is that conditional tab groups (using the &lt;code&gt;addClientTabGroup()&lt;/code&gt; method) will remove and re-add themselves every time a new figure is selected that uses the tab group. This creates a &quot;flashing&quot; effect as the view is rendered during the removal and addition process. For reference, I&#039;m using Matlab R2016b. Is this a unique issue, or are other people seeing the same effects?]]></description>
			<content:encoded><![CDATA[<p>Thanks for writing this series, I&#8217;ve found using the ToolGroup very enjoyable in new lightweight apps. One issue/annoyance I&#8217;ve noticed is that conditional tab groups (using the <code>addClientTabGroup()</code> method) will remove and re-add themselves every time a new figure is selected that uses the tab group. This creates a &#8220;flashing&#8221; effect as the view is rendered during the removal and addition process. For reference, I&#8217;m using Matlab R2016b. Is this a unique issue, or are other people seeing the same effects?</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Yair Altman		</title>
		<link>https://undocumentedmatlab.com/articles/matlab-toolstrip-part-2-toolgroup-app#comment-471983</link>

		<dc:creator><![CDATA[Yair Altman]]></dc:creator>
		<pubDate>Mon, 01 Apr 2019 14:15:28 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=8059#comment-471983</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://undocumentedmatlab.com/articles/matlab-toolstrip-part-2-toolgroup-app#comment-471435&quot;&gt;Arash Marashian&lt;/a&gt;.

@Arash - I plan to discuss client layups in a future post of this mini-series. In the meantime you can play with this:
&lt;pre lang=&quot;matlab&quot;&gt;
jDesktop = com.mathworks.mlservices.MatlabDesktopServices.getDesktop;
dockType = jDesktop.TILED;  % NONE=0, MAXIMIZED=1, TILED=2, FLOATING=3
panelSize = java.awt.Dimension(2,1);  % 2 columns, 1 row  (leave =[] for non-TILED)
jDesktop.setDocumentArrangement(hToolGroup.Name, dockType, panelSize);
&lt;/pre&gt;]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://undocumentedmatlab.com/articles/matlab-toolstrip-part-2-toolgroup-app#comment-471435">Arash Marashian</a>.</p>
<p>@Arash &#8211; I plan to discuss client layups in a future post of this mini-series. In the meantime you can play with this:</p>
<pre lang="matlab">
jDesktop = com.mathworks.mlservices.MatlabDesktopServices.getDesktop;
dockType = jDesktop.TILED;  % NONE=0, MAXIMIZED=1, TILED=2, FLOATING=3
panelSize = java.awt.Dimension(2,1);  % 2 columns, 1 row  (leave =[] for non-TILED)
jDesktop.setDocumentArrangement(hToolGroup.Name, dockType, panelSize);
</pre>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Arash Marashian		</title>
		<link>https://undocumentedmatlab.com/articles/matlab-toolstrip-part-2-toolgroup-app#comment-471435</link>

		<dc:creator><![CDATA[Arash Marashian]]></dc:creator>
		<pubDate>Sat, 30 Mar 2019 15:46:34 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=8059#comment-471435</guid>

					<description><![CDATA[Hi, thanks for your good information,
I have a question here:
how can we set a specific initial view model?
For example, I want to plot step resp. and impulse resp. together in one window (as we have &quot;left/right&quot; in the view tab).]]></description>
			<content:encoded><![CDATA[<p>Hi, thanks for your good information,<br />
I have a question here:<br />
how can we set a specific initial view model?<br />
For example, I want to plot step resp. and impulse resp. together in one window (as we have &#8220;left/right&#8221; in the view tab).</p>
]]></content:encoded>
		
			</item>
	</channel>
</rss>
