<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/169067</link>
    <title>MATLAB Central Newsreader - set background of uicontrol text box to be transparent?</title>
    <description>Feed for thread: set background of uicontrol text box to be transparent?</description>
    <language>en-us</language>
    <copyright>&amp;copy;1994-2008 by The MathWorks, Inc.</copyright>
    <webmaster>webmaster@mathworks.com</webmaster>
    <generator>MATLAB Central Newsreader</generator>
    <docs>http://blogs.law.harvard.edu/tech/rss</docs>
    <ttl>60</ttl>
    <image>
      <title>The MathWorks</title>
      <url>http://www.mathworks.com/images/membrane_icon.gif</url>
    </image>
    <item>
      <pubDate>Sun, 11 May 2008 08:25:06 -0400</pubDate>
      <title>set background of uicontrol text box to be transparent?</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/169067#431429</link>
      <author>Vihang Patil</author>
      <description>Hello&lt;br&gt;
Is there any way to turn the background of the text box &lt;br&gt;
uicontrol to be transparent?&lt;br&gt;
ex: I have a figure window which has an image displayed on &lt;br&gt;
it. I just want the text part of the uicontrol to be &lt;br&gt;
displayed and want the rest of the part to be transparent &lt;br&gt;
so that I can see the image displayed in the figure window &lt;br&gt;
beneath it.&lt;br&gt;
&lt;br&gt;
I have tried this but this doesnt help;&lt;br&gt;
&lt;br&gt;
load trees&lt;br&gt;
h1 = figure,&lt;br&gt;
h2 = imshow(X,map);&lt;br&gt;
h=uicontrol('style','text','string','hello');&lt;br&gt;
set(h,'position',[100 150 50 20]);&lt;br&gt;
parentColor = get(get(h, 'parent'), 'color');&lt;br&gt;
set(h,'foregroundcolor', [0 0 0], ...&lt;br&gt;
'backgroundcolor', parentColor);&lt;br&gt;
&lt;br&gt;
The above will set the background of the text control to &lt;br&gt;
that of the figure window and not the one of the trees.&lt;br&gt;
Any help?&lt;br&gt;
Vihang&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
</description>
    </item>
    <item>
      <pubDate>Mon, 12 May 2008 10:49:03 -0400</pubDate>
      <title>Re: set background of uicontrol text box to be transparent?</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/169067#431528</link>
      <author>Pekka </author>
      <description>"Vihang Patil" &amp;lt;vihang_patil@yahoo.com&amp;gt; wrote in message &lt;br&gt;
&amp;lt;g06ah2$9dh$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; Hello&lt;br&gt;
&amp;gt; Is there any way to turn the background of the text box &lt;br&gt;
&amp;gt; uicontrol to be transparent?&lt;br&gt;
&amp;gt; ex: I have a figure window which has an image displayed &lt;br&gt;
on &lt;br&gt;
&amp;gt; it. I just want the text part of the uicontrol to be &lt;br&gt;
&amp;gt; displayed and want the rest of the part to be transparent &lt;br&gt;
&amp;gt; so that I can see the image displayed in the figure &lt;br&gt;
window &lt;br&gt;
&amp;gt; beneath it.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; I have tried this but this doesnt help;&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; load trees&lt;br&gt;
&amp;gt; h1 = figure,&lt;br&gt;
&amp;gt; h2 = imshow(X,map);&lt;br&gt;
&amp;gt; h=uicontrol('style','text','string','hello');&lt;br&gt;
&amp;gt; set(h,'position',[100 150 50 20]);&lt;br&gt;
&amp;gt; parentColor = get(get(h, 'parent'), 'color');&lt;br&gt;
&amp;gt; set(h,'foregroundcolor', [0 0 0], ...&lt;br&gt;
&amp;gt; 'backgroundcolor', parentColor);&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; The above will set the background of the text control to &lt;br&gt;
&amp;gt; that of the figure window and not the one of the trees.&lt;br&gt;
&amp;gt; Any help?&lt;br&gt;
&amp;gt; Vihang&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
Do you have to use uicontrol? &lt;br&gt;
It doesn't accept BackgroundColor 'none', which is&lt;br&gt;
the default of text objects.&lt;br&gt;
h=text('string','hello','position',[140 150]);&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
</description>
    </item>
    <item>
      <pubDate>Mon, 12 May 2008 10:58:03 -0400</pubDate>
      <title>Re: set background of uicontrol text box to be transparent?</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/169067#431529</link>
      <author>Vihang Patil</author>
      <description>"Pekka " &amp;lt;pekka.nospam.kumpulainen@tut.please.fi&amp;gt; wrote in &lt;br&gt;
message &amp;lt;g097av$7vc$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; "Vihang Patil" &amp;lt;vihang_patil@yahoo.com&amp;gt; wrote in message &lt;br&gt;
&amp;gt; &amp;lt;g06ah2$9dh$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; &amp;gt; Hello&lt;br&gt;
&amp;gt; &amp;gt; Is there any way to turn the background of the text &lt;br&gt;
box &lt;br&gt;
&amp;gt; &amp;gt; uicontrol to be transparent?&lt;br&gt;
&amp;gt; &amp;gt; ex: I have a figure window which has an image &lt;br&gt;
displayed &lt;br&gt;
&amp;gt; on &lt;br&gt;
&amp;gt; &amp;gt; it. I just want the text part of the uicontrol to be &lt;br&gt;
&amp;gt; &amp;gt; displayed and want the rest of the part to be &lt;br&gt;
transparent &lt;br&gt;
&amp;gt; &amp;gt; so that I can see the image displayed in the figure &lt;br&gt;
&amp;gt; window &lt;br&gt;
&amp;gt; &amp;gt; beneath it.&lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; I have tried this but this doesnt help;&lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; load trees&lt;br&gt;
&amp;gt; &amp;gt; h1 = figure,&lt;br&gt;
&amp;gt; &amp;gt; h2 = imshow(X,map);&lt;br&gt;
&amp;gt; &amp;gt; h=uicontrol('style','text','string','hello');&lt;br&gt;
&amp;gt; &amp;gt; set(h,'position',[100 150 50 20]);&lt;br&gt;
&amp;gt; &amp;gt; parentColor = get(get(h, 'parent'), 'color');&lt;br&gt;
&amp;gt; &amp;gt; set(h,'foregroundcolor', [0 0 0], ...&lt;br&gt;
&amp;gt; &amp;gt; 'backgroundcolor', parentColor);&lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; The above will set the background of the text control &lt;br&gt;
to &lt;br&gt;
&amp;gt; &amp;gt; that of the figure window and not the one of the trees.&lt;br&gt;
&amp;gt; &amp;gt; Any help?&lt;br&gt;
&amp;gt; &amp;gt; Vihang&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Do you have to use uicontrol? &lt;br&gt;
&amp;gt; It doesn't accept BackgroundColor 'none', which is&lt;br&gt;
&amp;gt; the default of text objects.&lt;br&gt;
&amp;gt; h=text('string','hello','position',[140 150]);&lt;br&gt;
&amp;gt; &lt;br&gt;
&lt;br&gt;
Hello Pekka&lt;br&gt;
Yes, I am very much interested to use uicontrol text box, &lt;br&gt;
as it provide me flexibility to pick and place using guide.&lt;br&gt;
The text() function, though solves my purpose but doesnt &lt;br&gt;
give me that flexibilty to pick and place.&lt;br&gt;
Regards&lt;br&gt;
Vihang&lt;br&gt;
</description>
    </item>
  </channel>
</rss>
