Displaying real time numerical values on GUI

Hi,
I want to display a changing number in an editbox available on my GUI figure. What command should I use for that and how do I specify it is exact location in the edit box?

 Accepted Answer

Specifying an exact position in an edit box is difficult. There is no direct mechanism to do it (unless it can be done at the Java level).
edit boxes do automatic line wrapping.
edit boxes format strings using the font in use for the box. The default font is a proportional font, in which each character takes a different amount of room, and there can be factors such as kerning at play. The smallest horizontal spacing adjustment that can be made is the width of a space character.
Horizontal positioning is easier if you use a fixed-width font -- at least then you could do pure (width * chars) spacing, but micro-spacing would be out.

More Answers (1)

I would use a timer
doc timer
You specify where it is in the edit box by modifying the editbox's string.
doc uicontrol

Tags

Community Treasure Hunt

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

Start Hunting!