Place a pushbutton on uitable to display new input data
2 次查看(过去 30 天)
显示 更早的评论
How to create a pushbutton programmatically in an editable uitable to refresh the newly input data. I have this sample code,
f = figure('Position',[700 200 240 100],'Name','Derated');
t = uitable(f);
t.ColumnName = {'Rating(MW)','FOR/State Probability'};
t.RowName = [];
t.Data = [0 0; 0 0; 0 0];
t.Position(3) = t.Extent(3);
t.Position(4) = t.Extent(4);
t.ColumnEditable = [true true];
disp(t.Data)
0 个评论
采纳的回答
KL
2017-11-19
set the ColumnEditable property true
t.ColumnEditable = [true true];
and place a pushbutton on the figure and use its callback to get the new data,
newData = get(t,'Data');
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Migrate GUIDE Apps 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!