WindowKeyPressFcn removes focus from figure when multiple figures are open

3 ビュー (過去 30 日間)
Stephan Heise
Stephan Heise 2016 年 3 月 18 日
コメント済み: Jan 2016 年 3 月 19 日
Hi,
I wrote a function for stepping through individual plot lines within an axes using the arrow keys, which I then place in the figure's WindowKeyPressFcn (a bit similar to what was done here: http://de.mathworks.com/matlabcentral/answers/100024-how-can-i-use-up-and-down-arrow-keys-to-scroll-through-my-plots-in-matlab-7-7-r2008b). It works as long as only one figure is open that uses this functionality. As soon as I open a second figure which has the same WindowKeyPressFcn, multiple key presses don't work because the focus seems to the lost after a key press. So I have to do the key press, click the figure to regain focus, key-press, click, ... which isn't really comfortable.
Does anyone know what's happening there and how I could prevent the focus-losing? Thanks in advance for any help!
Stephan.
  1 件のコメント
Jan
Jan 2016 年 3 月 19 日
Without seeing the code it is impossible to guess what happens.

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeGraphics Object Programming についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by