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?

 採用された回答

Walter Roberson
Walter Roberson 2012 年 2 月 3 日

1 投票

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.

その他の回答 (1 件)

Sean de Wolski
Sean de Wolski 2012 年 2 月 3 日

0 投票

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

カテゴリ

ヘルプ センター および File ExchangeApp Building についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by