how to connect table with checkbox? dynamic? GUI
1 回表示 (過去 30 日間)
古いコメントを表示
Hi i am trying to set as many checkboxes as i have rows in my dynamic table. an than connect the checkbox with his row. Like row1 connected to chekcbox 1, to enable oder disable the row. thanks for helping!
function Szenario_Einlesen_Callback(hObject, eventdata, handles) global Szenario
Szenario = xlsread(uigetfile ({'.xlsx'}))
anzahl_eigenschaften = size(Szenario,1)
%data=eigenschaften
eigenschaften = cell(anzahl_eigenschaften,1);
for i=1:anzahl_eigenschaften
eigenschaften{i,1} = Szenario(i)
set (handles.uitable4 , 'data',eigenschaften)
end
end
function uitable4_CellEditCallback(hObject, eventdata, handles)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/169352/image.png)
0 件のコメント
回答 (2 件)
Jordy Jose
2018 年 2 月 2 日
Hi,
One thing you could do is, in the CellEditCallback based on the checkbox state, change the hObject.Data(selectedInd) to eventdata.PreviousData.
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Tables についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!