Problem with JavaFrame handle
조회 수: 2 (최근 30일)
이전 댓글 표시
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
답변 (0개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!