フィルターのクリア

How to increase a value with the arrow keys???

11 ビュー (過去 30 日間)
Emily Smith
Emily Smith 2016 年 10 月 18 日
コメント済み: Walter Roberson 2016 年 10 月 19 日
I would like to be able to increase a number by pressing on the right arrow key, and decrease it by pressing on the left arrow key. I would like it to increase or decrease by 10 each time starting at 10: 10, 20, 30, 40,.....
Thank you!

回答 (1 件)

Walter Roberson
Walter Roberson 2016 年 10 月 18 日
Create a figure and configure a Windowkeypressfcn callback that gets the figure CurrentKey property and decides what to do.
Or use one of the File Exchange contributions to wait for a key to be pressed.
Also if you have a slider and the slider has focus then the uparrow and right arrow increase the value by sliderstep and the down arrow and left arrow decrease by sliderstep

カテゴリ

Help Center および File ExchangeInteractive Control and Callbacks についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by