Callback function on window focus?

I created a figure with
f = figure
Is it possible to make something happen (callback) when the window containing my figure is selected ("on Focus")?

回答(1 个)

f = figure;
drawnow
figure(f);

2 个评论

I'm not asking how to give focus to the window but how to recognize that the user selected the window (i.e. detect window focus) and set a callback.
what do you want to write in the callback? if the figure is selected?

请先登录,再进行评论。

类别

帮助中心File Exchange 中查找有关 Interactive Control and Callbacks 的更多信息

产品

版本

R2016a

Community Treasure Hunt

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

Start Hunting!

Translated by