GUI - set a object to be selectable or not

조회 수: 5 (최근 30일)
Luca Amerio
Luca Amerio 2015년 12월 21일
답변: Rebecca Krosnick 2015년 12월 23일
Hi everybody.
I have a GUI (programmatically created) with an axis in it. I would like to have the zoom/datatip/select command available to be used inside the axis, but I noticed that the user is able to use the Edit Plot tool outside the axis area to move GUI parts.
Is it possible to limit the Edit Plot tool to the axis content?
thank you
  댓글 수: 1
Renato Agurto
Renato Agurto 2015년 12월 21일
Hi. Do you need the edit plot tool inside the axis?

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

답변 (1개)

Rebecca Krosnick
Rebecca Krosnick 2015년 12월 23일
plotedit(figHandle, 'off');
will turn off plot edit mode for the figure with handle "figHandle". You will then no longer be able to move GUI components. The documentation link for "plotedit": http://www.mathworks.com/help/matlab/ref/plotedit.html
You can then use the "datacursormode" function to turn on datatip and selection for axes data. Use these commands:
dcmHandle = datacursormode(figHandle);
dcmHandle.Enable = 'on';
To turn on zooming for the figure, use the "zoom" function:
zoom(figHandle, 'on');

카테고리

Help CenterFile Exchange에서 Data Exploration에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by