Trigger event for graphic handle object?

3 vues (au cours des 30 derniers jours)
Bruno Luong
Bruno Luong le 19 Juil 2021
The function notify seems to be designed for user-define class. Is it possible to make it works on MATLAB graphic handle objects such as uibutton. This code
fig = uifigure;
btn = uibutton(fig);
addlistener(btn, 'PropertyAdded', @(varargin) disp('trigger'));
notify(fig, 'PropertyAdded')
returns the following error:
Returns error
Error using matlab.ui.Figure/notify
Cannot notify listeners of event 'PropertyAdded' in class 'dynamicprops'.

Réponses (0)

Catégories

En savoir plus sur Develop uifigure-Based Apps 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