about the cursor return to command window
10 ビュー (過去 30 日間)
古いコメントを表示
It's usually that when we input 'figure'on the command window, the figure window would come out and display on the most significant end. But if I want to the return back to the command window without click on it,which statement I can use after the 'figure' function could help me achive that goal?(not 'figure;clear all', I want to keep those figure)
0 件のコメント
採用された回答
Image Analyst
2014 年 1 月 4 日
The cursor won't appear unless the command window has focus. Though if you just call figure, the figure has focus but if you just start typing, it will go into the command window even though the cursor wasn't showing/blinking there (I tried it). So you need to figure out how to set focus back to your command window immediately after you're done putting stuff into your figure window. You can probably do it with some Java trick, so I refer you to here: http://undocumentedmatlab.com/?s=focus
0 件のコメント
その他の回答 (1 件)
Jan
2014 年 1 月 4 日
編集済み: Jan
2014 年 1 月 4 日
This is the job for the command commandwindow
figure; drawnow; commandwindow
The drawnow is essential, because otherwise the event stack is evaluated when the command window gets the focus - and then the figure is on top. So force the processing of the event queue by drawnow and call commandwindow afterwards.
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Interactive Control and Callbacks についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!