This is the function executed by the callback
function pushbutton(hObject, eventdata, edit_text_handle, Reassign_handle)
str_entered = get(edit_text_handle,'string');
if str_entered, 0:255;
col_val = str_entered;
else
col_val = str_entered;
end
set(Reassign_handle, col_val);
The callback is
h.buttonfour = uicontrol('style', 'pushbutton', 'position', [30 350 130 20], 'string', 'Adjust Tissue Value');
set(h.buttonfour, 'callback', {@pushbutton, edit_text_handle, Reassign_handle});
However when i run my gui and try and use this functionality i get the following error
Error using set
Invalid handle
Error in pushbutton (line 9)
set(Reassign_handle, col_val);
Error while evaluating UIControl Callback
I cant see why there is an error using set in the way i have.
Any help would be appreciated.
Many Thanks all
Luke