Update Edit Box in GUI
显示 更早的评论
I am making a GUI to operate a magnet field controller. I have an editable text box to enter field values, and it works when entering values from the computer keyboard. However, I also have a number pad on the GUI to update the text box that way, however, if I have to enter a value such as 200, when I enter the numbers to append on they replace the current value and only display one number at a time. Is there some way to tell the box to hold the numbers?
Thanks
Umar
采纳的回答
更多回答(1 个)
Image Analyst
2016-3-7
编辑:Image Analyst
2016-3-7
0 个投票
If the number in the edit field is highlighted, then yes, typing anything (like a number) will replace the text that's in there. Typing a second, third, fourth number will append to the existing characters in the edit text box. That's totally normal and how all programs operate. If the edit text is not highlighted, then characters will appear one at a time at the location of the cursor as you type them. Again, totally normal. I guess I don't understand what the problem is.
If you wanted to enter 200 and not show anything until the second 0 is typed (if that's what you meant by "hold the numbers", then that's not how it works. For example how would it know that you're done and not planning on typing another number, like 2001? Plus, it's very disconcerting to the user to type and not see anything show up.
类别
在 帮助中心 和 File Exchange 中查找有关 App Building 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!