필터 지우기
필터 지우기

en/disable a figure

조회 수: 2 (최근 30일)
jeff wu
jeff wu 2012년 5월 7일
hy, i got myself a little gui with subfigures ans it would be comforable to lock the main gui figure while a subfigure is still open. is there a way? I tried with uiwait(mymainfigure), but the problem is that i cant call that from the subfigure because i got it in another file unless i call that one with the main figure included which seems not very elegant.
thanks for help
  댓글 수: 1
Sean de Wolski
Sean de Wolski 2012년 5월 7일
I don't see why that isn't very elegant? Though it's not completely clear what you're doing.

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

채택된 답변

Walter Roberson
Walter Roberson 2012년 5월 7일
Perhaps it would work to set the window type for the subfigure to be 'modal'. (Note that if you do that, then any menubars or menu items you have added will not be usable.)
You should not be uiwait'ing your main figure: your main figure, when invoking the subfigure, should uiwait() the subfigure.
Or possibly for your purposes, you should just set the main figure to be invisible.
  댓글 수: 2
jeff wu
jeff wu 2012년 5월 7일
perfect!!! with adding a simple line it does what i want to, or probably more like it doesnt do what i dont want it to... :-)
thanks a lot
Walter Roberson
Walter Roberson 2012년 5월 7일
Which technical approach did you go with?

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

추가 답변 (1개)

Jan
Jan 2012년 5월 7일
I do not like modal dialogs. I've been too often in the situation, that a modal dialog prevents, that I can use the command window to get an information, which is useful to fill in the dialog.
Therefore I suggest FEX: enabledisable-figure or setting the 'Enable' property of all uicontrols to inactive programmatically.

카테고리

Help CenterFile Exchange에서 Interactive Control and Callbacks에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by