Is there any way to access all properties of a table in App Designer
3 次查看(过去 30 天)
显示 更早的评论
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 个评论
回答(1 个)
Melissa Williams
2017-10-16
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 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Develop Apps Using App Designer 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!