ButtonDownFcn on ActXControl video element

1 vue (au cours des 30 derniers jours)
Filip Dvoracek
Filip Dvoracek le 18 Nov 2013
Hi,
at first, I wanted to create ActXControl video element using GUIDE. There ButtonDownFcn could be easily created. But when I compiled the code to exe file, there was always an error at the begining of the program concerning this video element.
So I decided to create the video window in the code by calling actxcontrol and defining size of the element. Is there any difference in these two solutions? At lease this one does not cause error after compilation. But how can I create ButtonDownFcn on this element?
Thanks for help, Filip

Réponse acceptée

Friedrich
Friedrich le 21 Nov 2013
Hi,
you have to use registerevent:
%http://www.mathworks.com/help/matlab/matlab_external/using-events.html#f90131
function test
f = figure('position',[30 30 500 500]);
a = actxcontrol('Sysmon.3',[10 10 400 400], f);
a.events
a.registerevent({'OnDblClick',@mycb});
end
function mycb(varargin)
celldisp(varargin)
end

Plus de réponses (0)

Catégories

En savoir plus sur Migrate GUIDE 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