Effacer les filtres
Effacer les filtres

Calling Matlab GUI popupmenu callback on click

1 vue (au cours des 30 derniers jours)
Aalaas
Aalaas le 4 Oct 2016
Réponse apportée : Jan le 23 Juil 2019
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!!

Réponses (2)

Joe Yeh
Joe Yeh le 4 Oct 2016
This question has already been asked before and there's a rather detailed explanation.
  1 commentaire
David Lessard
David Lessard le 23 Juil 2019
This question is not related

Connectez-vous pour commenter.


Jan
Jan le 23 Juil 2019
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.

Catégories

En savoir plus sur Interactive Control and Callbacks dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by