How can the column names of a uitable be defined as editable?

58 visualizaciones (últimos 30 días)
Fabian Gock
Fabian Gock el 25 de Sept. de 2018
Editada: Adam Danz el 25 de Sept. de 2018
I'm working on a GUI with AppDesigner and use a table to display calculated Data. With each calculation, the table gets a new column. I want the name of this column to be editable by the user so he can name the set of results as he pleases.
Thanks in advance for any suggestions. -Fabian

Respuesta aceptada

Adam Danz
Adam Danz el 25 de Sept. de 2018
Editada: Adam Danz el 25 de Sept. de 2018
The only way I know how to change columns names within a table is by doing it within the code (see this link )
set(t, 'ColumnName', {'MT', 'MSTd', 'VIP', 'LIP'});
which can't be done by the user directly using the GUI. Instead, you could create edit boxes above or on top of the uitable column headers where the user can edit them directly. Each of them could have a callback function that executes the set() command above so the ColumnName property is edited.
Another option would be to use the first row of the uitable as the header row and allow the columns to be editable by the user (which could result in other unintended consequences).

Más respuestas (0)

Categorías

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

Productos


Versión

R2017b

Community Treasure Hunt

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

Start Hunting!

Translated by