Uitable get value from edit text
조회 수: 4 (최근 30일)
이전 댓글 표시
Hello,
I have a project and I need to get a vector in an edit text and after that I need to do compan from that vector and after to show the matrix in a uitable. Any suggestion?
댓글 수: 0
답변 (1개)
Morteza Hajitabar Firuzjaei
2018년 1월 29일
see below:
function logNames
% Create UI figure and components
fig = uifigure('Position',[100 100 410 400]);
loglist = uitextarea(fig,...
'Position',[134 49 150 277],...
'Editable','off');
namefld = uieditfield(fig,'text',...
'Value', 'Bob Langley',...
'Position',[134 367 100 22],...
'ValueChangedFcn',@(namefld,event) nValChanged(namefld,event,loglist));
end
% Create ValueChangedFcn callback
function nValChanged(namefld,event,loglist)
newvalue = event.Value;
previousValue = event.PreviousValue;
loglist.Value = [previousValue; loglist.Value];
end
Morteza Hajitabar Firuzjaei
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Octave에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!