Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: How to get gcf in base workspace from a GUI
Date: Fri, 10 Jul 2009 17:05:19 +0000 (UTC)
Organization: Battelle Energy Alliance (INL)
Lines: 16
Message-ID: <h37scf$eh7$1@fred.mathworks.com>
References: <h35p59$pvc$1@fred.mathworks.com>
Reply-To: <HIDDEN>
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 1247245519 14887 172.30.248.35 (10 Jul 2009 17:05:19 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Fri, 10 Jul 2009 17:05:19 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 688530
Xref: news.mathworks.com comp.soft-sys.matlab:554515


I did figure out how you could do what you wanted to do originally.  Try this:

Open 3 figures:

figure,figure,figure

Now, do this:

get(0,'children')

Then select figure 1 as current, and again:


get(0,'children')

So from in the GUI, look at the second item in the list to get the figure which was current before the callback was triggered by an event on the GUI.