Alignment for column names in uitables in App Designer

54 visualizaciones (últimos 30 días)
Furkan Cakmak
Furkan Cakmak el 28 de Mayo de 2020
Hello,
I am struggling about making the alingment of column names. I want them to be positioned as center. I know how to do this for elements inside the table, but I could not figure out how to apply same thing for column names as well. Has anybody faced and solved this problem?
Regards,
  2 comentarios
Ali Taheri
Ali Taheri el 16 de Feb. de 2022
Hello Cakmak,
how you align elements inside the table in center?
Eduardo Vicente Wolf Trentini
Eduardo Vicente Wolf Trentini el 31 de Mzo. de 2023
My table is called app.UITable
s = uistyle('HorizontalAlignment','center');
addStyle(app.UITable,s,'table','');

Iniciar sesión para comentar.

Respuestas (1)

Jalaj Gambhir
Jalaj Gambhir el 27 de Ag. de 2020
Hi,
I have heard that this issue is known and the concerned parties may be investigating further.
Meanwhile an indirect workaround that you might try is to have another table with one row (without column header) and place it on top of your main table as its column header. You can apply uistyle to align the contents in the second table with only one row, which can be further used as column header in your main table.
Hope this helps!
  3 comentarios
Adam Danz
Adam Danz el 25 de Mayo de 2021
See this answer that shows how to move the header strings into the first row of data and format the uitable so that it appears to have header names.
Nathan Bblanc
Nathan Bblanc el 8 de Nov. de 2022
I have to say that is workaround is quite insufficient. if a table is part of an App and is changed interactively this complicates the code, sometimes siginifantly. Hope this issue will be fixed in upcoming releases.

Iniciar sesión para comentar.

Categorías

Más información sobre Develop Apps Using App Designer en Help Center y File Exchange.

Productos


Versión

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by