link between edit text 1 and 2 when puch button has click

edit 1 at input 1 is 15, how when I click push button, the 15 will appear at edit2?

 Accepted Answer

in the edit1 callback save the variable inputted by the user in a variable:
handles.myvar = get(handles.edit1,'string');
guidata(hObject, handles);
in the pushbutton callback put:
set(handles.edit2,'string',handles.myvar)

More Answers (0)

Categories

Find more on Interactive Control and Callbacks in Help Center and File Exchange

Tags

Asked:

on 13 May 2014

Commented:

on 14 May 2014

Community Treasure Hunt

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

Start Hunting!