Hide maximize/minimize and close buttons for a figure window

조회 수: 11 (최근 30일)
Julián Francisco
Julián Francisco 2012년 3월 4일
I have a figure window and I want to remove the maximize/minimize and close buttons of it. I can not use any type of Java containers (JWindow, JPanel, ...) because they are not allowed to be Matlab components' parents. I am thinking of using some Java removeComponent command o something like this (I do not know if it will work). However, when I try to look for that buttons inside the structure of components through jf handle, I do not find where they are kept. Here is my code:
fh = figure('Menu','none','Toolbar','none');
jf = get(handle(fh),'JavaFrame');
drawnow;
jf.set,

채택된 답변

Jan
Jan 2012년 3월 4일
If you are working under Windows, you can crop the complete window border using FEX: WindowAPI:
WindowAPI(gcf, 'Clip', true);
  댓글 수: 3
Jan
Jan 2012년 3월 4일
Why doesn't it work?
Perhaps you want: WindowAPI(gcf, 'position', 'work'); WindowAPI(gcf, 'Clip', true);
But after setting the position of the figure contents to the work area of the screen, the clipping is only useful for multi-monitor setups.
Julián Francisco
Julián Francisco 2012년 3월 5일
@Jan Simon: I finally got to maximize the figure window properly using WindowAPI(gcf, 'position', 'full'); and changing the state of Clip. Thank you back.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Environment and Settings에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by