Callback function on window focus?

2 views (last 30 days)
Giuseppe Antonio
Giuseppe Antonio on 19 Nov 2019
Commented: Ajay Kumar on 19 Nov 2019
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)

Ajay Kumar
Ajay Kumar on 19 Nov 2019
f = figure;
drawnow
figure(f);
  2 Comments
Giuseppe Antonio
Giuseppe Antonio on 19 Nov 2019
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.
Ajay Kumar
Ajay Kumar on 19 Nov 2019
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

Community Treasure Hunt

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

Start Hunting!