GUI - set a object to be selectable or not
5 ビュー (過去 30 日間)
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?
回答 (1 件)
Rebecca Krosnick 2015 年 12 月 23 日
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';
Documention for "datacursormode": http://www.mathworks.com/help/matlab/ref/datacursormode.html
To turn on zooming for the figure, use the "zoom" function:
Documentation for "zoom": http://www.mathworks.com/help/matlab/ref/zoom.html