Callback function on window focus?

2 Ansichten (letzte 30 Tage)
Giuseppe Antonio
Giuseppe Antonio am 19 Nov. 2019
Kommentiert: Ajay Kumar am 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")?

Antworten (1)

Ajay Kumar
Ajay Kumar am 19 Nov. 2019
f = figure;
drawnow
figure(f);
  2 Kommentare
Giuseppe Antonio
Giuseppe Antonio am 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 am 19 Nov. 2019
what do you want to write in the callback? if the figure is selected?

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Interactive Control and Callbacks finden Sie in Help Center und File Exchange

Produkte


Version

R2016a

Community Treasure Hunt

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

Start Hunting!

Translated by