Path: news.mathworks.com!not-for-mail
From: "Vihang Patil" <vihang_patil@yahoo.com>
Newsgroups: comp.soft-sys.matlab
Subject: set background of uicontrol text box to be transparent?
Date: Sun, 11 May 2008 08:25:06 +0000 (UTC)
Organization: Konem Solutions
Lines: 27
Message-ID: <g06ah2$9dh$1@fred.mathworks.com>
Reply-To: "Vihang Patil" <vihang_patil@yahoo.com>
NNTP-Posting-Host: webapp-05-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1210494306 9649 172.30.248.35 (11 May 2008 08:25:06 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Sun, 11 May 2008 08:25:06 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 413701
Xref: news.mathworks.com comp.soft-sys.matlab:467775


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