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")?

Answers (1)

f = figure;
drawnow
figure(f);

2 Comments

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?

Sign in to comment.

Categories

Find more on Interactive Control and Callbacks in Help Center and File Exchange

Products

Release

R2016a

Asked:

on 19 Nov 2019

Commented:

on 19 Nov 2019

Community Treasure Hunt

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

Start Hunting!