How to input two static text box independently?

How to input two static text box independently?

댓글 수: 5

Lee - please provide some context. Are your static text boxes part of a GUI? Are they labels?
Like, i have two static box working (Yes, they are part of a GUI), and.... if i am done inputting to the input1 static box, i want to type to the input2 static box as next input using buttons.
Lee - how do you indicate that you are done inputting to the input1 static text? What code do you have to write to that field? I'm guessing that you push one of the buttons (in the GUI) and you expect to see the text from that button appear in input1 (or input2) via the button callback. Do you have code that does that? If so, what does it look like?
lud = get(handles.input1,'value');
if lud==1
set(handles.input4,'String');
else
set(handles.input1,'String');
end
i try this logically and it didn't work. (i try to use toggle button for this)
why
lud = get(handles.input1,'value');
? What are you expecting lud to be here? input1 is a static text control so how will the value (which isn't the string) relevant?
Also,
set(handles.input4,'String');
you aren't passing a string (array of characters) so nothing will happen here. What are you intending with this (and the other) line of code?
Is there a toggle button? Or is there something else that should indicate which line to use? What does input1 represent? What does input2 represent?

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

도움말 센터File Exchange에서 Characters and Strings에 대해 자세히 알아보기

제품

릴리스

R2018a

태그

질문:

2020년 2월 26일

댓글:

2020년 2월 27일

Community Treasure Hunt

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

Start Hunting!

Translated by