Is CellEditCallback not supported in 2017b?

The following lines of code works in R2019b but does not work in R2017b.
Upon running the code, it displays table with {1,2;3,4}.
Changing any values in the table should show the btn data, event data, and display message saying it "Works!".
Does anyone has a solution or workaround for this?
f = uifigure;
t = uitable(f,'Data', {1, 2; 3,4},...
'Position', [20 20 300 300],...
'ColumnEditable', [true true],...
'CellEditCallback',@(btn, event) clbk(btn, event,f));
function clbk(btn, event,f)
disp('Works!');
disp(btn);
disp(event);
disp(f);
end

답변 (1개)

Walter Roberson
Walter Roberson 2020년 11월 12일

0 개 추천

(The property is at least documented as existing for uitable in uifigure in R2017b; https://www.mathworks.com/help/releases/R2017b/matlab/ref/matlab.ui.control.tableappd-properties.html#property_d119e1112562 )

댓글 수: 5

hal9k
hal9k 2020년 11월 12일
The get(uitable) shows the CellEditCallBack listed.
But it does not even fire in R2017b. Is it a known bug?
Ah I meant to post as a comment not as an Answer
hal9k
hal9k 2020년 11월 13일
편집: hal9k 2020년 11월 13일
Wish Mathworks staff answered it. Now I have to rewrite all my codes because uifigure and uitable seems incompatible in 2017b :(.
Steven Lord
Steven Lord 2020년 11월 13일
If you want to make sure MathWorks staff see and respond to the question, please send it to Technical Support using the Contact Support link on the Support section of the MathWorks website. [No, I cannot answer it because I do not know of any reason why it would not trigger in the earlier release.]
I do not see any public bug report related to this topic.
There is a bug report against R2019a having to do with CellEditCallback, but that has to do with modifying a data value inside the callback.

댓글을 달려면 로그인하십시오.

카테고리

도움말 센터File Exchange에서 Develop Apps Programmatically에 대해 자세히 알아보기

질문:

2020년 11월 12일

댓글:

2020년 11월 13일

Community Treasure Hunt

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

Start Hunting!

Translated by