Format currency in a uitable in app designer
5 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Rodney Smith
le 1 Mai 2025
Commenté : Rodney Smith
le 1 Mai 2025
I have a table with a column that has dollar amounts with $ sign and commas. I have created the values as strings:
"$ 1,111,111"; "$ 2,222" so that the commas will line up. When I send this to a table in app designer it strips out the leading spaces between the dollar sign and the number:
$ 1,111,111
$ 2,222
What I want is
$ 1,111,111
$ 2,222
Any suggestions?
0 commentaires
Réponse acceptée
Walter Roberson
le 1 Mai 2025
Modifié(e) : Walter Roberson
le 1 Mai 2025
You need to specify the uitable FontName property, supplying a fixed-width font.
Your current problem is that spaces in proportion-width fonts are very thin compared to other characters.
Note: there is no way to specify a font name on a per-column basis, only the entire uitable at a time
3 commentaires
Walter Roberson
le 1 Mai 2025
This is a problem in R2024b.
This problem is solved in R2025a Pre-release.
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Develop Apps Using App Designer dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
