Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: How to create figures and dock them into my main GUI figure?
Date: Sat, 13 Oct 2007 22:06:05 +0000 (UTC)
Organization: TACT Computer Systems Ltd
Lines: 41
Message-ID: <ferfgd$8g9$1@fred.mathworks.com>
References: <favbc6$5uj$1@fred.mathworks.com> <fbqjt8$ea8$1@fred.mathworks.com> <fcn80f$15l$1@fred.mathworks.com> <fcofcq$coa$1@fred.mathworks.com> <fdhk5l$ch8$1@fred.mathworks.com>
Reply-To: <HIDDEN>
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 1192313165 8713 172.30.248.38 (13 Oct 2007 22:06:05 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Sat, 13 Oct 2007 22:06:05 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 642467
Xref: news.mathworks.com comp.soft-sys.matlab:432794



"Yair Altman" <altmanyDEL@gmailDEL.comDEL> wrote in message
<fdhk5l$ch8$1@fred.mathworks.com>...
> > > Docking is different from using subplots. I want to
> > > programmatically create a figure (a window) and
specify that
> > > it should be docked within another figure I have created
> > > earlier. Can Matlab do this? Thanks.
> > 
> > use:
> > set(<figurename>, 'WindowStyle', 'docked')
> 
> 
> Docking figures places them in the "Figures" group
> container. Here is an undocumented/unsupported hack to dock
> figures into your own custom-made group. This enables
> docking some figures into the "Figures" container and others
> into the "myGroup" container:
> 
> desktop = com.mathworks.mde.desk.MLDesktop.getInstance;
> myGroup = desktop.addGroup('myGroup');
> set(get(gcf,'javaframe'), 'GroupName','myGroup');
> % docking gcf will now add it to myGroup, not "Figures"
> 
> More hacks on groups (resizing, minimizing/maximizing,
> docking/undocking etc.) can be found here:
> http://tinyurl.com/32q6hb and: http://tinyurl.com/2xpxdp
> 
> Yair Altman
> http://ymasoftware.com


For anyone interested, I recently posted a submission on the
File Exchange that handles figure docking into any Matlab or
user-defined figure-group (including odd groups like the
Matlab editor...): setFigDockGroup -
http://www.mathworks.com/matlabcentral/fileexchange/loadFile.do?objectId=16650

enjoy :)

Yair Altman