Path: news.mathworks.com!not-for-mail
From: "Vihang Patil" <vihang_patil@yahoo.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: set background of uicontrol text box to be transparent?
Date: Mon, 12 May 2008 10:58:03 +0000 (UTC)
Organization: Konem Solutions
Lines: 49
Message-ID: <g097rr$72r$1@fred.mathworks.com>
References: <g06ah2$9dh$1@fred.mathworks.com> <g097av$7vc$1@fred.mathworks.com>
Reply-To: "Vihang Patil" <vihang_patil@yahoo.com>
NNTP-Posting-Host: webapp-03-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1210589883 7259 172.30.248.38 (12 May 2008 10:58:03 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Mon, 12 May 2008 10:58:03 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 413701
Xref: news.mathworks.com comp.soft-sys.matlab:467875


"Pekka " <pekka.nospam.kumpulainen@tut.please.fi> wrote in 
message <g097av$7vc$1@fred.mathworks.com>...
> "Vihang Patil" <vihang_patil@yahoo.com> wrote in message 
> <g06ah2$9dh$1@fred.mathworks.com>...
> > Hello
> > Is there any way to turn the background of the text 
box 
> > uicontrol to be transparent?
> > ex: I have a figure window which has an image 
displayed 
> on 
> > it. I just want the text part of the uicontrol to be 
> > displayed and want the rest of the part to be 
transparent 
> > so that I can see the image displayed in the figure 
> window 
> > beneath it.
> > 
> > I have tried this but this doesnt help;
> > 
> > load trees
> > h1 = figure,
> > h2 = imshow(X,map);
> > h=uicontrol('style','text','string','hello');
> > set(h,'position',[100 150 50 20]);
> > parentColor = get(get(h, 'parent'), 'color');
> > set(h,'foregroundcolor', [0 0 0], ...
> > 'backgroundcolor', parentColor);
> > 
> > The above will set the background of the text control 
to 
> > that of the figure window and not the one of the trees.
> > Any help?
> > Vihang
> 
> 
> Do you have to use uicontrol? 
> It doesn't accept BackgroundColor 'none', which is
> the default of text objects.
> h=text('string','hello','position',[140 150]);
> 

Hello Pekka
Yes, I am very much interested to use uicontrol text box, 
as it provide me flexibility to pick and place using guide.
The text() function, though solves my purpose but doesnt 
give me that flexibilty to pick and place.
Regards
Vihang