Problem with JavaFrame handle

조회 수: 2 (최근 30일)
ANTONIELLO
ANTONIELLO 2013년 12월 23일
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)]);

답변 (0개)

카테고리

Help CenterFile Exchange에서 2-D and 3-D Plots에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by