フィルターのクリア

Update App Designer UITable State

7 ビュー (過去 30 日間)
GDelga
GDelga 2020 年 4 月 30 日
回答済み: Kanishk Singhal 2023 年 7 月 13 日
Hi, I have this table created in AppDesigner:
% Create UITable
app.UITable = uitable(app.GridLayout4);
app.UITable.ColumnName = {'Date'; 'Front Car'; 'Back Car'; 'Front Truck'; 'Back Truck'; 'Front Motorbike'; 'Back Motorbike'; 'Front Bus'; 'Back Bus'};
app.UITable.RowName = {};
app.UITable.Layout.Row = 1;
app.UITable.Layout.Column = 2;
Then when user press a button, load data in the table:
app.UITable.ColumnName = {"Date"};
for i=1:length(fields)
app.UITable.ColumnName{end+1} = channelInfo.FieldDescriptions{fields(i)};
end
r = horzcat(string(timestamps), string(data));
total = ["TOTAL", string(sum(data))];
r = vertcat(r,total);
set(app.UITable,'Data',cellstr(r));
drawnow;
Table properties change, but are not visible in view. The same thing happens to me with a graph, it loads the data, but it is not seen. What can I do?

回答 (1 件)

Kanishk Singhal
Kanishk Singhal 2023 年 7 月 13 日
You have to put this in your button pushed callback function.
ButtonPushedFcn is the callback function for a button which is executed whenever you push the button.
You can add your second block of code in a function and add the function in callback of button using inline function.

カテゴリ

Help Center および File ExchangeMigrate GUIDE Apps についてさらに検索

製品


リリース

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by