How come my checkboxes in my UITable are not being editable?

7 次查看(过去 30 天)
I've been trying to be able to edit information within a app.UITable. Shown below, I was able to make the UITable editable with drop downs.
app.UITable.ColumnFormat = {'numeric' {'Yes' 'No'} 'logical' 'logical'}
I was able to add a Callback where it's able to add a new row, shown below:
function CreateButtonPushed(app, event)
index = size(app.UITable.Data,1);
app.UITable.Data(index + 1:) = {'' '' '0' '0'};
end
In addition, I added the callback to the button as shown below:
app.CreateButton.ButtonPushFcn = createCallbackFcn(app, @CreateButtonPushed, true);
I'm having a problem where I'm not able to edit the created rows, I'm able to edit the numeric and dropdown, but the logical aspects would reset to false, empty, no checkmark.
(Nevermind, I found my problem, I wanted to at least post this so just in case if anyone needs it.)
app.UITable.Data(index + 1:) = {'' '' false false}; % Solution to my problem

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Migrate GUIDE Apps 的更多信息

产品


版本

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by