<?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: Aligning uicontrol contents	</title>
	<atom:link href="https://undocumentedmatlab.com/articles/aligning-uicontrol-contents/feed" rel="self" type="application/rss+xml" />
	<link>https://undocumentedmatlab.com/articles/aligning-uicontrol-contents?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=aligning-uicontrol-contents</link>
	<description>Professional Matlab consulting, development and training</description>
	<lastBuildDate>Tue, 23 Mar 2021 07:19:44 +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/aligning-uicontrol-contents#comment-510419</link>

		<dc:creator><![CDATA[Yair Altman]]></dc:creator>
		<pubDate>Tue, 23 Mar 2021 07:19:44 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=6663#comment-510419</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://undocumentedmatlab.com/articles/aligning-uicontrol-contents#comment-510416&quot;&gt;Ajay Krishna&lt;/a&gt;.

I assume that you refer to the html tags example for uitable at the bottom of the article. If you click a uitable cell, you enter editor mode, and this may behave in an unexpected manner with html tags. 
To fix this you need to change the uitable column alignment instead of using html tags. This is a bit more difficult to do, but it solves the problem of cell-editing. For information on how to do this, refer to my &lt;a href=&quot;http://undocumentedmatlab.com/books/matlab-java&quot;&gt;Matlab-Java programming book&lt;/a&gt;, or my &lt;a href=&quot;http://undocumentedmatlab.com/articles/uitable-customization-report&quot;&gt;uitable customization report&lt;/a&gt;.]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://undocumentedmatlab.com/articles/aligning-uicontrol-contents#comment-510416">Ajay Krishna</a>.</p>
<p>I assume that you refer to the html tags example for uitable at the bottom of the article. If you click a uitable cell, you enter editor mode, and this may behave in an unexpected manner with html tags.<br />
To fix this you need to change the uitable column alignment instead of using html tags. This is a bit more difficult to do, but it solves the problem of cell-editing. For information on how to do this, refer to my <a href="http://undocumentedmatlab.com/books/matlab-java">Matlab-Java programming book</a>, or my <a href="http://undocumentedmatlab.com/articles/uitable-customization-report">uitable customization report</a>.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Ajay Krishna		</title>
		<link>https://undocumentedmatlab.com/articles/aligning-uicontrol-contents#comment-510416</link>

		<dc:creator><![CDATA[Ajay Krishna]]></dc:creator>
		<pubDate>Tue, 23 Mar 2021 03:17:48 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=6663#comment-510416</guid>

					<description><![CDATA[Hello Yair,

i tried replicating the example with all the cells center aligned.
The problem is when i click the 1st cell the text of neighbouring cell changes to white or it disappears.
What can be the possible fix for this.
Please help me out.

&lt;pre lang=&quot;matlab&quot;&gt;uitable(&#039;Units&#039;,&#039;norm&#039;,&#039;Pos&#039;,[0,0,0.8,0.3],&#039;Data&#039;,{&#039;Center&#039;,&#039;Center&#039;,&#039;Right&#039;})&lt;/pre&gt;

Thanks,
V. Ajay Krihsna]]></description>
			<content:encoded><![CDATA[<p>Hello Yair,</p>
<p>i tried replicating the example with all the cells center aligned.<br />
The problem is when i click the 1st cell the text of neighbouring cell changes to white or it disappears.<br />
What can be the possible fix for this.<br />
Please help me out.</p>
<pre lang="matlab">uitable('Units','norm','Pos',[0,0,0.8,0.3],'Data',{'Center','Center','Right'})</pre>
<p>Thanks,<br />
V. Ajay Krihsna</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Yair Altman		</title>
		<link>https://undocumentedmatlab.com/articles/aligning-uicontrol-contents#comment-414149</link>

		<dc:creator><![CDATA[Yair Altman]]></dc:creator>
		<pubDate>Fri, 29 Sep 2017 06:19:17 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=6663#comment-414149</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://undocumentedmatlab.com/articles/aligning-uicontrol-contents#comment-414133&quot;&gt;Narendra Kintali&lt;/a&gt;.

These customizations do not work with web-based figures (created with App Designer) - only with tables that are created in non-web figures, using GUIDE or the &lt;i&gt;&lt;b&gt;uitable&lt;/b&gt;&lt;/i&gt; function.]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://undocumentedmatlab.com/articles/aligning-uicontrol-contents#comment-414133">Narendra Kintali</a>.</p>
<p>These customizations do not work with web-based figures (created with App Designer) &#8211; only with tables that are created in non-web figures, using GUIDE or the <i><b>uitable</b></i> function.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Narendra Kintali		</title>
		<link>https://undocumentedmatlab.com/articles/aligning-uicontrol-contents#comment-414133</link>

		<dc:creator><![CDATA[Narendra Kintali]]></dc:creator>
		<pubDate>Thu, 28 Sep 2017 22:36:19 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=6663#comment-414133</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://undocumentedmatlab.com/articles/aligning-uicontrol-contents#comment-413948&quot;&gt;Yair Altman&lt;/a&gt;.

sir,

Its not working. It gives error as &quot;No appropriate method, property, or field &#039;setRowHeight&#039; for class &#039;matlab.ui.control.Table&#039;.&quot;]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://undocumentedmatlab.com/articles/aligning-uicontrol-contents#comment-413948">Yair Altman</a>.</p>
<p>sir,</p>
<p>Its not working. It gives error as &#8220;No appropriate method, property, or field &#8216;setRowHeight&#8217; for class &#8216;matlab.ui.control.Table&#8217;.&#8221;</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Yair Altman		</title>
		<link>https://undocumentedmatlab.com/articles/aligning-uicontrol-contents#comment-413948</link>

		<dc:creator><![CDATA[Yair Altman]]></dc:creator>
		<pubDate>Sun, 24 Sep 2017 07:39:12 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=6663#comment-413948</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://undocumentedmatlab.com/articles/aligning-uicontrol-contents#comment-413829&quot;&gt;Narendra Kintali&lt;/a&gt;.

@Narendra - you can use the underlying Java table&#039;s &lt;a href=&quot;https://docs.oracle.com/javase/7/docs/api/javax/swing/JTable.html#setRowHeight(int)&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;&lt;i&gt;setRowHeight()&lt;/i&gt; method&lt;/a&gt;

&lt;pre lang=&quot;matlab&quot;&gt;
hTable = uitable(...);
jTable = findjobj(hTable);
try jTable = jTable.getViewport.getView; catch, end

jTable.setRowHeight(10);    % all rows = 10px
jTable.setRowHeight(5,12);  % row #6 = 12px
&lt;/pre&gt;]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://undocumentedmatlab.com/articles/aligning-uicontrol-contents#comment-413829">Narendra Kintali</a>.</p>
<p>@Narendra &#8211; you can use the underlying Java table&#8217;s <a href="https://docs.oracle.com/javase/7/docs/api/javax/swing/JTable.html#setRowHeight(int)" target="_blank" rel="nofollow"><i>setRowHeight()</i> method</a></p>
<pre lang="matlab">
hTable = uitable(...);
jTable = findjobj(hTable);
try jTable = jTable.getViewport.getView; catch, end

jTable.setRowHeight(10);    % all rows = 10px
jTable.setRowHeight(5,12);  % row #6 = 12px
</pre>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Narendra Kintali		</title>
		<link>https://undocumentedmatlab.com/articles/aligning-uicontrol-contents#comment-413829</link>

		<dc:creator><![CDATA[Narendra Kintali]]></dc:creator>
		<pubDate>Wed, 20 Sep 2017 16:12:34 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=6663#comment-413829</guid>

					<description><![CDATA[Hi sir, I am using uitable for my project, When I am trying to display a array of values. The values are aligned to top, which makes them not visible. So I need to change the height of row in uitable, Please tell me How can I change Height of row in uitable.]]></description>
			<content:encoded><![CDATA[<p>Hi sir, I am using uitable for my project, When I am trying to display a array of values. The values are aligned to top, which makes them not visible. So I need to change the height of row in uitable, Please tell me How can I change Height of row in uitable.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Yair Altman		</title>
		<link>https://undocumentedmatlab.com/articles/aligning-uicontrol-contents#comment-411851</link>

		<dc:creator><![CDATA[Yair Altman]]></dc:creator>
		<pubDate>Sat, 12 Aug 2017 17:37:57 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=6663#comment-411851</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://undocumentedmatlab.com/articles/aligning-uicontrol-contents#comment-411822&quot;&gt;Les Beckham&lt;/a&gt;.

@Les - HTML formatting is more CPU and memory-intensive, while being less powerful, than using Cell Renderers (&lt;a href=&quot;http://undocumentedmatlab.com/blog/uitable-cell-colors&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;details&lt;/a&gt;). Also, whenever you update an HTML-formatted cell, you&#039;d see the full HTML string as the text in the cell content, which is a bit awkward. Also, if you try to get the values in the table, you&#039;d need to parse out the HTML tags.

However, there is no dispute that HTML formatting is super-easy to use, and in many cases the drawbacks listed above pale in comparison to the simplicity and usefulness of HTML formatting. So in general I use HTML formatting for most simple formatting, and I only use Cell Renderers for large tables (with numerous formatted cells), when the formatting is not easy to achieve with HTML, and/or when the table cells need to be updated by the user.]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://undocumentedmatlab.com/articles/aligning-uicontrol-contents#comment-411822">Les Beckham</a>.</p>
<p>@Les &#8211; HTML formatting is more CPU and memory-intensive, while being less powerful, than using Cell Renderers (<a href="http://undocumentedmatlab.com/blog/uitable-cell-colors" target="_blank" rel="nofollow">details</a>). Also, whenever you update an HTML-formatted cell, you&#8217;d see the full HTML string as the text in the cell content, which is a bit awkward. Also, if you try to get the values in the table, you&#8217;d need to parse out the HTML tags.</p>
<p>However, there is no dispute that HTML formatting is super-easy to use, and in many cases the drawbacks listed above pale in comparison to the simplicity and usefulness of HTML formatting. So in general I use HTML formatting for most simple formatting, and I only use Cell Renderers for large tables (with numerous formatted cells), when the formatting is not easy to achieve with HTML, and/or when the table cells need to be updated by the user.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Les Beckham		</title>
		<link>https://undocumentedmatlab.com/articles/aligning-uicontrol-contents#comment-411822</link>

		<dc:creator><![CDATA[Les Beckham]]></dc:creator>
		<pubDate>Sat, 12 Aug 2017 03:01:06 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=6663#comment-411822</guid>

					<description><![CDATA[Interesting post, as always.

I&#039;m curious why you state that &quot;HTML formatting is generally frowned-upon compared to the alternatives&quot;.  By whom?  And why?  

Perhaps you can elaborate.

Thank you]]></description>
			<content:encoded><![CDATA[<p>Interesting post, as always.</p>
<p>I&#8217;m curious why you state that &#8220;HTML formatting is generally frowned-upon compared to the alternatives&#8221;.  By whom?  And why?  </p>
<p>Perhaps you can elaborate.</p>
<p>Thank you</p>
]]></content:encoded>
		
			</item>
	</channel>
</rss>
