<?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: Rich Matlab editbox contents</title> <atom:link href="http://undocumentedmatlab.com/blog/rich-matlab-editbox-contents/feed/" rel="self" type="application/rss+xml" /><link>http://undocumentedmatlab.com/blog/rich-matlab-editbox-contents/</link> <description>Charting Matlab's unsupported hidden underbelly</description> <lastBuildDate>Mon, 21 May 2012 11:05:42 +0000</lastBuildDate> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.1.1</generator> <item><title>By: Yair Altman</title><link>http://undocumentedmatlab.com/blog/rich-matlab-editbox-contents/#comment-85482</link> <dc:creator>Yair Altman</dc:creator> <pubDate>Thu, 10 May 2012 21:17:31 +0000</pubDate> <guid
isPermaLink="false">http://undocumentedmatlab.com/?p=944#comment-85482</guid> <description>@Andrew - only a subset of CSS is processed correctly by Swing (which is used for Matlab&#039;s controls). I showed a simple example of using CSS styles in the &lt;a href=&quot;http://undocumentedmatlab.com/blog/rich-matlab-editbox-contents/#EditorKit&quot; rel=&quot;nofollow&quot;&gt;EditorKit section&lt;/a&gt; of the article, but note that many style directives are simply ignored. The Font tag may be deprecated but it works great...Re &lt;i&gt;setText()&lt;/i&gt;, remember that it sets the entire text, so you must preserve the previous hyper-text tags and styles when you add new lines. There&#039;s no magic in there, recheck your code.</description> <content:encoded><![CDATA[<p>@Andrew &#8211; only a subset of CSS is processed correctly by Swing (which is used for Matlab&#8217;s controls). I showed a simple example of using CSS styles in the <a
href="http://undocumentedmatlab.com/blog/rich-matlab-editbox-contents/#EditorKit" rel="nofollow">EditorKit section</a> of the article, but note that many style directives are simply ignored. The Font tag may be deprecated but it works great&#8230;</p><p>Re <i>setText()</i>, remember that it sets the entire text, so you must preserve the previous hyper-text tags and styles when you add new lines. There&#8217;s no magic in there, recheck your code.</p> ]]></content:encoded> </item> <item><title>By: Andrew</title><link>http://undocumentedmatlab.com/blog/rich-matlab-editbox-contents/#comment-85447</link> <dc:creator>Andrew</dc:creator> <pubDate>Thu, 10 May 2012 13:14:35 +0000</pubDate> <guid
isPermaLink="false">http://undocumentedmatlab.com/?p=944#comment-85447</guid> <description>Hi Yair,
I&#039;m creating a message log on an application I&#039;m working on. I appreciate your tutorial on how to do this using HTML tags. I saw on the w3school website that the HTML &quot;font&quot; tag has been depricated. It says to use style tags instead. I tried modifying your logMessage function to use styles instead of the depricated tags. When I do this, it only works for the most recent line. When I looked closer, it appeared that either &quot;setText&quot; or &quot;getText&quot; is removing a bunch of the HTML tags I put in. As a result, all the previous lines show up unformatted. Please let me know your thoughts.
Thanks!
~Andrew</description> <content:encoded><![CDATA[<p>Hi Yair,<br
/> I&#8217;m creating a message log on an application I&#8217;m working on. I appreciate your tutorial on how to do this using HTML tags. I saw on the w3school website that the HTML &#8220;font&#8221; tag has been depricated. It says to use style tags instead. I tried modifying your logMessage function to use styles instead of the depricated tags. When I do this, it only works for the most recent line. When I looked closer, it appeared that either &#8220;setText&#8221; or &#8220;getText&#8221; is removing a bunch of the HTML tags I put in. As a result, all the previous lines show up unformatted. Please let me know your thoughts.<br
/> Thanks!<br
/> ~Andrew</p> ]]></content:encoded> </item> <item><title>By: Yair Altman</title><link>http://undocumentedmatlab.com/blog/rich-matlab-editbox-contents/#comment-41258</link> <dc:creator>Yair Altman</dc:creator> <pubDate>Mon, 25 Apr 2011 20:25:59 +0000</pubDate> <guid
isPermaLink="false">http://undocumentedmatlab.com/?p=944#comment-41258</guid> <description>@Jorge - unfortunately, not all CSS style formattings are supported</description> <content:encoded><![CDATA[<p>@Jorge &#8211; unfortunately, not all CSS style formattings are supported</p> ]]></content:encoded> </item> <item><title>By: Jorge</title><link>http://undocumentedmatlab.com/blog/rich-matlab-editbox-contents/#comment-38800</link> <dc:creator>Jorge</dc:creator> <pubDate>Mon, 04 Apr 2011 16:30:04 +0000</pubDate> <guid
isPermaLink="false">http://undocumentedmatlab.com/?p=944#comment-38800</guid> <description>htmlStr contains, but it doesnt show: *div style=&quot;text-decoration: overline&quot;+text*/div+....* means </description> <content:encoded><![CDATA[<p>htmlStr contains, but it doesnt show: *div style=&#8221;text-decoration: overline&#8221;+text*/div+&#8230;.* means</p> ]]></content:encoded> </item> <item><title>By: Jorge</title><link>http://undocumentedmatlab.com/blog/rich-matlab-editbox-contents/#comment-38799</link> <dc:creator>Jorge</dc:creator> <pubDate>Mon, 04 Apr 2011 16:26:49 +0000</pubDate> <guid
isPermaLink="false">http://undocumentedmatlab.com/?p=944#comment-38799</guid> <description>Nice article with useful information. But i have problem. I try overline text, but it doesnt work.&lt;pre lang=&quot;matlab&quot;&gt;
htmlStr = [&#039;Matlab&#039;];
jEditbox.setText(htmlStr)
&lt;/pre&gt;Is there any change, how to make overline text ?Thank you for answer</description> <content:encoded><![CDATA[<p>Nice article with useful information. But i have problem. I try overline text, but it doesnt work.</p><div
class="wp_syntax"><div
class="code"><pre class="matlab" style="font-family:monospace;">htmlStr = <span style="color: #080;">&#91;</span><span style="color:#A020F0;">'Matlab'</span><span style="color: #080;">&#93;</span>;
jEditbox.<span style="">setText</span><span style="color: #080;">&#40;</span>htmlStr<span style="color: #080;">&#41;</span></pre></div></div><p>Is there any change, how to make overline text ?</p><p>Thank you for answer</p> ]]></content:encoded> </item> <item><title>By: Yair Altman</title><link>http://undocumentedmatlab.com/blog/rich-matlab-editbox-contents/#comment-18319</link> <dc:creator>Yair Altman</dc:creator> <pubDate>Wed, 22 Sep 2010 06:53:25 +0000</pubDate> <guid
isPermaLink="false">http://undocumentedmatlab.com/?p=944#comment-18319</guid> <description>@Noushin - of course; HTML is not multi-line by default, as you will notice if you prepare a multi-line HTML file and load it in your browser. To separate lines, you can use the HTML &lt;p&gt; or &lt;br&gt; tags. The &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://www.w3schools.com/html/default.asp&quot; rel=&quot;nofollow&quot;&gt;W3Schools&lt;/a&gt; website is a good reference &amp; tutorial for HTML and related technologies.</description> <content:encoded><![CDATA[<p>@Noushin &#8211; of course; HTML is not multi-line by default, as you will notice if you prepare a multi-line HTML file and load it in your browser. To separate lines, you can use the HTML &lt;p&gt; or &lt;br&gt; tags. The <a
rel="nofollow" target="_blank" href="http://www.w3schools.com/html/default.asp" rel="nofollow">W3Schools</a> website is a good reference &#038; tutorial for HTML and related technologies.</p> ]]></content:encoded> </item> <item><title>By: Noushin</title><link>http://undocumentedmatlab.com/blog/rich-matlab-editbox-contents/#comment-18305</link> <dc:creator>Noushin</dc:creator> <pubDate>Wed, 22 Sep 2010 02:05:35 +0000</pubDate> <guid
isPermaLink="false">http://undocumentedmatlab.com/?p=944#comment-18305</guid> <description>Hi
Thank you very much for the useful info. In my GUI, I first read a long string from an editbox (multiple lines) and then I&#039;d like to change the font color of a portion of this text and display it in the same editbox. I&#039;m not familiar with HTML coding but that&#039;s what I did using your example above:
&lt;pre lang=&quot;matlab&quot;&gt;
hEditbox=handles.my_editbox;
jScrollPane = findjobj(hEditbox);
jViewPort = jScrollPane.getViewport;
jEditbox = jViewPort.getComponent(0);
jEditbox.setEditorKit(javax.swing.text.html.HTMLEditorKit);
htmlStr = [str_part1,&#039;&lt;b&gt;&#039;, str_part2,&#039;&lt;/b&gt;&#039;, str_part3);
jEditbox.setText(htmlStr);
&lt;/pre&gt;the formatted string is displayed in the editbox however, it is no longer divided nicely between multiple lines! There is a very long first line where most of the string is out of the right margin. I was wondering is there is another setting that I need to tune for this to be properly displayed?I appreciate your help, Noushin</description> <content:encoded><![CDATA[<p>Hi<br
/> Thank you very much for the useful info. In my GUI, I first read a long string from an editbox (multiple lines) and then I&#8217;d like to change the font color of a portion of this text and display it in the same editbox. I&#8217;m not familiar with HTML coding but that&#8217;s what I did using your example above:</p><div
class="wp_syntax"><div
class="code"><pre class="matlab" style="font-family:monospace;">hEditbox=handles.<span style="">my_editbox</span>;
jScrollPane = findjobj<span style="color: #080;">&#40;</span>hEditbox<span style="color: #080;">&#41;</span>;
jViewPort = jScrollPane.<span style="">getViewport</span>;
jEditbox = jViewPort.<span style="">getComponent</span><span style="color: #080;">&#40;</span><span style="color: #33f;">0</span><span style="color: #080;">&#41;</span>;
jEditbox.<span style="">setEditorKit</span><span style="color: #080;">&#40;</span>javax.<span style="">swing</span>.<span style="">text</span>.<span style="">html</span>.<span style="">HTMLEditorKit</span><span style="color: #080;">&#41;</span>;
htmlStr = <span style="color: #080;">&#91;</span>str_part1,<span style="color:#A020F0;">'&lt;b&gt;'</span>, str_part2,<span style="color:#A020F0;">'&lt;/b&gt;'</span>, str_part3<span style="color: #080;">&#41;</span>;
jEditbox.<span style="">setText</span><span style="color: #080;">&#40;</span>htmlStr<span style="color: #080;">&#41;</span>;</pre></div></div><p>the formatted string is displayed in the editbox however, it is no longer divided nicely between multiple lines! There is a very long first line where most of the string is out of the right margin. I was wondering is there is another setting that I need to tune for this to be properly displayed?</p><p>I appreciate your help, Noushin</p> ]]></content:encoded> </item> <item><title>By: Yair Altman</title><link>http://undocumentedmatlab.com/blog/rich-matlab-editbox-contents/#comment-12899</link> <dc:creator>Yair Altman</dc:creator> <pubDate>Fri, 16 Jul 2010 16:05:40 +0000</pubDate> <guid
isPermaLink="false">http://undocumentedmatlab.com/?p=944#comment-12899</guid> <description>Regular Matlab uicontrols do not support syntax hiliting - you need to use one of the controls I mentioned in http://undocumentedmatlab.com/blog/syntax-highlighted-labels-panels/</description> <content:encoded><![CDATA[<p>Regular Matlab uicontrols do not support syntax hiliting &#8211; you need to use one of the controls I mentioned in <a
href="http://undocumentedmatlab.com/blog/syntax-highlighted-labels-panels/" rel="nofollow">http://undocumentedmatlab.com/blog/syntax-highlighted-labels-panels/</a></p> ]]></content:encoded> </item> <item><title>By: Camilo</title><link>http://undocumentedmatlab.com/blog/rich-matlab-editbox-contents/#comment-12898</link> <dc:creator>Camilo</dc:creator> <pubDate>Fri, 16 Jul 2010 15:55:47 +0000</pubDate> <guid
isPermaLink="false">http://undocumentedmatlab.com/?p=944#comment-12898</guid> <description>Hello,
it&#039;s possible to set this property (Matlab Syntax) in a uicontrol type text?
thanks.Thank you!Best regardsCamilo</description> <content:encoded><![CDATA[<p>Hello,<br
/> it&#8217;s possible to set this property (Matlab Syntax) in a uicontrol type text?<br
/> thanks.</p><p>Thank you!</p><p>Best regards</p><p>Camilo</p> ]]></content:encoded> </item> <item><title>By: Yair Altman</title><link>http://undocumentedmatlab.com/blog/rich-matlab-editbox-contents/#comment-12725</link> <dc:creator>Yair Altman</dc:creator> <pubDate>Wed, 14 Jul 2010 16:06:16 +0000</pubDate> <guid
isPermaLink="false">http://undocumentedmatlab.com/?p=944#comment-12725</guid> <description>@Youlian and any other reader interested in syntax highlighting - I posted an expanded article about this topic in http://undocumentedmatlab.com/blog/syntax-highlighted-labels-panels/</description> <content:encoded><![CDATA[<p>@Youlian and any other reader interested in syntax highlighting &#8211; I posted an expanded article about this topic in <a
href="http://undocumentedmatlab.com/blog/syntax-highlighted-labels-panels/" rel="nofollow">http://undocumentedmatlab.com/blog/syntax-highlighted-labels-panels/</a></p> ]]></content:encoded> </item> </channel> </rss>

<!-- W3 Total Cache: Minify debug info:
Engine:             disk: basic
Theme:              b7666
Template:           single
-->
<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Served from: undocumentedmatlab.com @ 2012-05-21 19:13:33 -->

<!-- W3 Total Cache: Page cache debug info:
Engine:             disk: enhanced
Cache key:          blog/rich-matlab-editbox-contents/feed/_index.xml_gzip
Caching:            enabled
Status:             not cached
Creation Time:      0.532s
Header info:
X-Pingback:         http://undocumentedmatlab.com/blog/xmlrpc.php
Set-Cookie:         wpgb_visit_last_php-default=1337652812; expires=Wed, 22-May-2013 02:13:32 GMT; path=/
Link:               <http://undocumentedmatlab.com/?p=944>; rel=shortlink
Content-Type:       text/xml; charset=UTF-8
Last-Modified:      Tue, 22 May 2012 02:13:33 GMT
Vary:               Accept-Encoding, Cookie
Expires:            Tue, 22 May 2012 03:13:33 GMT
Pragma:             public
Cache-Control:      public, must-revalidate, proxy-revalidate
Etag:               be86de4b3bad4376899785d3fde30fd9
Content-Encoding:   gzip
-->
