Is there any way to access all properties of a table in App Designer
3 views (last 30 days)
Show older comments
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'}
0 Comments
Answers (1)
Melissa Williams
on 16 Oct 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.
0 Comments
See Also
Categories
Find more on Develop Apps Using App Designer in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!