필터 지우기
필터 지우기

Calling Matlab GUI popupmenu callback on click

조회 수: 1 (최근 30일)
Aalaas
Aalaas 2016년 10월 4일
답변: Jan 2019년 7월 23일
Hi,
I would like to update the options that should be shown in a popupmenu of a Matab GUI each time it is clicked on it. When I implement this functionality in the callback function, it only works when one of the choices is selected, not when the down arrow is clicked.
Is there any way to create a callback function that works when the down arrow is clicked, before selecting any of the options of the menu?
Thanks!!

답변 (2개)

Joe Yeh
Joe Yeh 2016년 10월 4일
This question has already been asked before and there's a rather detailed explanation.

Jan
Jan 2019년 7월 23일
No, there is no callback in the Matlab level.
You can use the Java callbacks, if your "Matlab GUI" is a figure, see https://undocumentedmatlab.com/blog/uicontrol-callbacks , but I do not know a method for uifigure windows.
I have simulated a popup menu in a similar case by a uicontextmenu and some graphical elements, which look like a popup. It works, but actually it is the porgrammers hell to emulate standard GUI elements.

카테고리

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