how to make edit text eccept more than a number

 Accepted Answer

uicontrol('style', 'edit') have a String property which is always a string or cell array of strings. Those strings can contain any character known to MATLAB (U+0000 to U+ffff). The more difficult part is to pull apart the string once you have it.

More Answers (2)

If you're using GUIDE, you can get the string in the edit text box from the properties of it. Let's say your edit text box has a tag "userInput". Then you just do
theString = handles.userInput.String;
If you have a really old version of MATLAB (prior to R2014b) you'll have to use the get() function:
theString = get(handles.userInput, 'String');
if you start working from others have stopped, you win the effort they've put.
Collaboration and cooperation are usually more productive than confrontation,
or denial by trying to build on your own what is already freely available out there.
Your calculator GUI effort, would you choose to, could start from any of the following:
If you find this answer of any help solving your question,
please click on the thumbs-up vote link,
thanks in advance
John

Categories

Tags

Community Treasure Hunt

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

Start Hunting!