Format Number in Edit Text Box
1 回表示 (過去 30 日間)
古いコメントを表示
Hi all, I have a GUI with several edit text boxes. Is there any way to change the format of a number in a text Box ? For example: 4.45567e2, but I want the longG format "445,567" so that it is more readable. Is this possible ? i will apreciate any Help Alex
0 件のコメント
採用された回答
Geoff Hayes
2016 年 9 月 21 日
set(handles.edit1,'String',sprintf('%.3f',pi))
would set the text in the edit control to 3.142. We use the .3 to indicate that we want three decimal places.
2 件のコメント
Geoff Hayes
2016 年 9 月 21 日
Hi Alex - you can set the HorizontalAlignment to centre so that the text is centred within the edit control. (I think that this may be the default setting for this property.)
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Text Data Preparation についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!