Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

Context menus didn't show where it should be.

조회 수: 1 (최근 30일)
QiQin Zhan
QiQin Zhan 2013년 3월 8일
마감: MATLAB Answer Bot 2021년 8월 20일
I use a ButtonDownFcn of axes1 to generate a context.However,all seems to be right except that the context doesn't show where the mouse click on.In fact,it always shows on the left buttom of the figure no matter where I click on the axes.The figure‘s units is set to normalized.
function axes1_ButtonDownFcn(hObject, eventdata, handles)
if strcmp(get(gcf,'SelectionType'),'alt') % Right click the mouse
pos=get(gcf,'CurrentPoint');
set(handles.Context_Menus,'position',[pos(1,1),pos(1,2)],'visible','on')
end

답변 (0개)

이 질문은 마감되었습니다.

태그

Community Treasure Hunt

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

Start Hunting!

Translated by