hi everyone, i have an edit text, pressing backspace, only when edit text become empty i want to set a string into a static text. how can i do? something like:
function edit_T KeyPressFcn(hObject, eventdata, handles)
if "press backspace" && "edit_T is empty"
set(handles.static_text,'String',string);

답변 (1개)

Walter Roberson
Walter Roberson 2015년 9월 24일

1 개 추천

"If you specify this property as a function handle (or cell array containing a function handle), MATLAB passes an object containing callback data as the second argument to the callback function. This object contains the properties described in the following table."
For backspace, the 'key' property will contain 'backspace'

카테고리

도움말 센터File Exchange에서 Interactive Control and Callbacks에 대해 자세히 알아보기

질문:

2015년 9월 24일

댓글:

2018년 7월 13일

Community Treasure Hunt

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

Start Hunting!

Translated by