How can I have a GUI that is like a telephone keypad where the numbers pressed are stored in a static text box, there is a clear key, and a backspace key to manipulate the text box?
4 views (last 30 days)
Show older comments
It should operate like a cellphone where one can type in a phone number and the numbers are displayed and can be cleared and/or deleted/backspace. I have most of the code already just need some help storing multiple numbers in the static text box and then manipulating them.
0 Comments
Answers (1)
Joseph Cheng
on 31 Mar 2014
Edited: Joseph Cheng
on 31 Mar 2014
without diving into your code too much and next time warn us that the computer will beep. Wasn't prepared for that. Anyways, to say display it like a cellphone why not read in the value of handles.keyF and then append it with the data for that key?
temp = get(handles.keyF,'String');
set(handles.keyF, 'String', [temp m]);
and then for delete key
temp = get(handles.keyF,'String');
temp(end) =[]; %make the last/end entry blank [];
set(handles.keyF, 'String', [temp]);
and then clear would just clear out the string for keyF
2 Comments
See Also
Categories
Find more on Application Deployment in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!