Home > matutils > setwinsize.m

setwinsize

PURPOSE ^

setwinsize(handle,x,y)

SYNOPSIS ^

function setwinsize(winhandle,x,y)

DESCRIPTION ^

 setwinsize(handle,x,y)

 Set the size of a window without moving the top left corner

 eg: setwinsize(gcf,1000,500)

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function setwinsize(winhandle,x,y)
0002 % setwinsize(handle,x,y)
0003 %
0004 % Set the size of a window without moving the top left corner
0005 %
0006 % eg: setwinsize(gcf,1000,500)
0007 
0008 p=get(winhandle,'Position');
0009 top=p(2)+p(4);
0010 p(3)=x;
0011 p(4)=y;
0012 p(2)=top-p(4);
0013 set(winhandle,'Position',p);

Generated on Sun 14-Jun-2015 17:12:45 by m2html © 2005