Comments on: Aligning uicontrol contents https://undocumentedmatlab.com/blog/aligning-uicontrol-contents Charting Matlab's unsupported hidden underbelly Sun, 22 Oct 2017 06:39:14 +0000 hourly 1 https://wordpress.org/?v=4.4.1 By: Yair Altmanhttps://undocumentedmatlab.com/blog/aligning-uicontrol-contents#comment-414149 Fri, 29 Sep 2017 06:19:17 +0000 http://undocumentedmatlab.com/?p=6663#comment-414149 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 uitable function.

]]>
By: Narendra Kintalihttps://undocumentedmatlab.com/blog/aligning-uicontrol-contents#comment-414133 Thu, 28 Sep 2017 22:36:19 +0000 http://undocumentedmatlab.com/?p=6663#comment-414133 sir,

Its not working. It gives error as “No appropriate method, property, or field ‘setRowHeight’ for class ‘matlab.ui.control.Table’.”

]]>
By: Yair Altmanhttps://undocumentedmatlab.com/blog/aligning-uicontrol-contents#comment-413948 Sun, 24 Sep 2017 07:39:12 +0000 http://undocumentedmatlab.com/?p=6663#comment-413948 @Narendra – you can use the underlying Java table’s setRowHeight() method

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
]]>
By: Narendra Kintalihttps://undocumentedmatlab.com/blog/aligning-uicontrol-contents#comment-413829 Wed, 20 Sep 2017 16:12:34 +0000 http://undocumentedmatlab.com/?p=6663#comment-413829 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.

]]>
By: Yair Altmanhttps://undocumentedmatlab.com/blog/aligning-uicontrol-contents#comment-411851 Sat, 12 Aug 2017 17:37:57 +0000 http://undocumentedmatlab.com/?p=6663#comment-411851 @Les – HTML formatting is more CPU and memory-intensive, while being less powerful, than using Cell Renderers (details). Also, whenever you update an HTML-formatted cell, you’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’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.

]]>
By: Les Beckhamhttps://undocumentedmatlab.com/blog/aligning-uicontrol-contents#comment-411822 Sat, 12 Aug 2017 03:01:06 +0000 http://undocumentedmatlab.com/?p=6663#comment-411822 Interesting post, as always.

I’m curious why you state that “HTML formatting is generally frowned-upon compared to the alternatives”. By whom? And why?

Perhaps you can elaborate.

Thank you

]]>