Is it possible to change the width and alignment of text within the initial column of a table in a GUI, using GUIDE or inside the code itself?
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
I am designing a table for use in a GUI, and I would like to change the width of the column circled in blue in the attached image. So far, I can only change it by changing the length of the text inside the boxes themselves. When I do that, it also centers the text within the column, leaving a lot of space on either side. Is it possible to re-align the text in this initial column with, say, the left side of the table? Also, is it possible more generally to change the width of that column regardless of how long the text in the boxes is?
2 commentaires
mbonus
le 13 Sep 2016
I don't know if you can do this in GUIDE, but if you programmatically create your GUI using uicontrol, you can format it using HTML.
Réponse acceptée
Walter Roberson
le 13 Sep 2016
If you make the cells for uipanel into strings, then they can be in HTML 3. For more information see https://www.mathworks.com/matlabcentral/answers/244201-how-to-locate-the-data-in-the-middle-of-the-column-uitable and http://undocumentedmatlab.com/blog/uitable-cell-colors/
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Migrate GUIDE Apps 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!