Specifications

5 Application Examples
5-48
Addresses = handles.Addresses;
Answer=questdlg('Do you want to change the phone number?', ...
'Change Phone Number', ...
'Yes','Cancel','Yes');
switch Answer
case 'Yes'
% If no name match was found create a new contact
Addresses(handles.Index).Phone = Current_Phone;
handles.Addresses = Addresses;
guidata(h,handles)
return
case 'Cancel'
% Revert back to the original number
set(handles.Contact_Phone,'String',Addresses(handles.Index).Phone)
return
end
Paging Through the Address Book – Prev/Next
The Prev and Next buttons page back and forth through the entries in the
address book. Both push buttons use the same callback,
Prev_Next_Callback.
You must set the
Callback property of both push buttons to call this
subfunction, as the following illustration of the
Prev push button Callback
property setting shows:
Determining Which Button Is Clicked
The callback defines an additional argument, str, that indicates which button,
Prev or Next, was clicked. For the Prev button Callback property (illustrated
above), the
Callback string includes 'Prev' as the last argument. The Next