Problem with JavaFrame handle

2 Ansichten (letzte 30 Tage)
ANTONIELLO
ANTONIELLO am 23 Dez. 2013
Hello
I’m trying to generate two figures with “attached” borders (see script below) and I’d like to resize them by acting on the first one. The following code works if I run each single row but the results is different if I try to run the whole script. It seems that the JavaFrame option doesn’t work in that case. I don’t know why. In the following the script.
Moreover I’d like to control in Matlab the minimize and maximize buttons at the top right of the figures/windows so to reduce both figures if I act on one. How to get handles of those controls?
Many thanks in advance.
h1 = figure('Units','normalized','Position',[.05 .1 .3 .75],'Name','MyGUI',... 'dockcontrol','on','menubar','none');
h2 = figure('Units','normalized','Position',[.361 .1 .55 .75],'Name','MyPlot',... 'dockcontrol','on','menubar','none','Resize','on');
hg=get(handle(h1),'JavaFrame'); set(hg, 'Maximized',true);
p1=get(h1,'Position');
set(h1,'Position',[p1(1)+.004, p1(2)+.01, p1(3)*.3, p1(4)-0.02]);
p3=get(h1,'Position');
set(h2,'Position',[p3(1)+p3(3)+.01,p3(2), p1(3)-p3(3)-.017, p3(4)]);

Antworten (0)

Kategorien

Mehr zu 2-D and 3-D Plots finden Sie in Help Center und File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by