User`s guide
An Address Book Reader (GUIDE)
return
end
% If resized figure is smal ler than original f igure then compensa te
% However, do not change figure size if it is docked; just adjust
% uicontrols
if ~strcmp(g et(h Object,'WindowStyle'),' docked')
if Figure_Size( 3) < Original_Size(3)
% If the w idth is too small then reset to o rigianl width
set(hObject,'Position',[Figure_Size(1) ...
Figure_Size(2) ...
Original_Size(3) ...
Original_Size(4)])
Figure_Size = get(hObject,'Position');
end
if abs(Figure_S ize( 4) - Original_Size( 4)) > 10 % pixels
% Do not a llow the height to change
set(hObject,'Position',[Figure_Size(1) ...
Figure_Size(2)+Figure_Size(4)-Origina l_Size(4) ...
Figure_Size(3) ...
Original_Size(4)])
end
movegui(hObject, 'onscreen')
end
% Get Contact_Name field Po sition for readjust ing its width
C_N_pos = get(handles.Contact_N ame,'Position');
ratio = Figure_Size(3) / Or iginal_Size(3);
% Reset it so that its width remains propo rtional to figure width
% The original width of the Contact_Name b ox is 72 (character s)
set(handles.Contact_Name,'Position' ,[C_N_pos(1) ...
C_N_pos(2) ...
ratio * 72 ...
C_N_pos(4)])
10-97