Stuart’s MATLAB Videos

Watch and Learn

uicontextmenu and ButtonDownFcn in MATLAB

When you use ButtonDownFcn in MATLAB, your callback is given an automatic input called hObject. This hObject is the handle of the object that you interacted with to invoke the callback, which makes it easy to define behavior based on the selected object. This is a little trickier when working with uicontextmenu, since the context menu itself is reported as the selected object. This video explains the behavior and shows one way to get the handle to the actual object the user selected. This is an advanced topic that assumes you know about callbacks and UiContextMenu.
  • print
  • send email


댓글을 남기려면 링크 를 클릭하여 MathWorks 계정에 로그인하거나 계정을 새로 만드십시오.