Is there any way to access all properties of a table in App Designer

2 visualizaciones (últimos 30 días)
Uday Patel
Uday Patel el 21 de Jun. de 2017
Respondida: Melissa Williams el 16 de Oct. de 2017
I know that code that App Designer manages is not editable, but it leaves some properties undefined that I'd like to define. For example, when I create a table and modify some uitable properties in design view, the following managed code gets generated and is not editable in code view.
% Create UITable
app.UITable = uitable(app.UIFigure);
app.UITable.ColumnName = {'01'; '02'; '03'; '04'; '05'; '06'; '07'; '08'; '09'; '10'};
app.UITable.ColumnWidth = {30, 30, 30, 30, 30, 30, 30, 30, 30, 30};
app.UITable.RowName = {};
app.UITable.RowStriping = 'off';
app.UITable.Position = [240 273 337 185];
However, RowName is not an available property in design view. Is there a way for me to define
app.UITable.RowName = {'A'; 'B'; 'C'; 'D'; 'E'; 'F'}

Respuestas (1)

Melissa Williams
Melissa Williams el 16 de Oct. de 2017
Hi Uday, You can do this programmatically in the startup function of the app. Right click on the UIFigure of the app in the Design View or Component Browser and select "Callbacks" -> "Add startupFcn callback".
The data of the table needs to be set prior to the row name, as row names will only appear for rows that have data.

Categorías

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

Etiquetas

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by