Uitable get value from edit text

2 views (last 30 days)
Fabian Marian
Fabian Marian on 29 Jan 2018
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?

Answers (1)

Morteza Hajitabar Firuzjaei
see below:
function logNames
% Create UI figure and components
fig = uifigure('Position',[100 100 410 400]);
loglist = uitextarea(fig,...
'Position',[134 49 150 277],...
namefld = uieditfield(fig,'text',...
'Value', 'Bob Langley',...
'Position',[134 367 100 22],...
'ValueChangedFcn',@(namefld,event) nValChanged(namefld,event,loglist));
% Create ValueChangedFcn callback
function nValChanged(namefld,event,loglist)
newvalue = event.Value;
previousValue = event.PreviousValue;
loglist.Value = [previousValue; loglist.Value];
Morteza Hajitabar Firuzjaei

Community Treasure Hunt

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

Start Hunting!