callback difficulties with variation

I have an 'edit text' that Ive trying to set with a 'pushbutton' that when pressed down would cause the edit text to increase from 0 in value of 1 per .1 seconds. Ive been thinking it would be under the keypressfcn and keyrelease callbacks?
My best guess has been
%Pushbutton callback
set(handles.edit, 'string', get hObject, 'value')
%edit text callback
set(handles.pushbutton, 'Value', str2num(get(handles.Edit, 'String')));

2 件のコメント

Jan
Jan 2018 年 10 月 18 日
編集済み: Jan 2018 年 10 月 18 日
Should the text change, when the button is pressed, or "per 0.1 seconds"? You mention an action of a button, so where is the connection to the keys, which are handled in the KeyPressFcn?
Please do not post a question twice. I've delete the duplicate thread.
andrew krugle
andrew krugle 2018 年 10 月 18 日
編集済み: andrew krugle 2018 年 10 月 18 日
sorry for the double post. And the text should change when pressed. And Im still very new to matlab so I presummed that Key press function was included in pressing a mouse. Im trying get the string from the edit text and have it as an input for a projectile gui that outpurs onto axes next to it. Aslo i attached a picture of what Im trying to explain.

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

回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeInteractive Control and Callbacks についてさらに検索

質問済み:

2018 年 10 月 17 日

編集済み:

2018 年 10 月 18 日

Community Treasure Hunt

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

Start Hunting!

Translated by