Chapter Contents

Previous

Next
Widget Class: _resize

Widget Class: _resize



Invoked when the widget is resized


Syntax
Details

Syntax

objectName._resize( );


Details

The _resize method is invoked automatically when the _resize method is enabled (see _enableResizeNotify) and the widget is resized. A widget can be resized through methods (_resizeRegion or _moveRegion) or attachments.

To enable or disable the _resize method, use the _enableResizeNotify and _disableResizeNotify methods, respectively.

CAUTION:
Avoid infinite loop with _resize If the _resize method calls a method that causes you to resize again (for example, _resizeRegion), the _resize method may be called again. The result may be an infinite loop. To avoid this problem, use the _disableResizeNotify method before you call the method that causes you to resize again and use _enableResizeNotify after you have called that method.  [cautionend]

Example

Suppose you have a SAS/GRAPH Output object and you want to play the Grseg entry associated with the object (via PROC GREPLAY) and retain the size of the object in the played graph. You can query the region size in inches and use these values to set the graphic options HSize and VSize. Whenever the graph object is resized, you need to reset the HSize and VSize options.

length hsize vsize 8;

RESIZE:
 method;
   _self_._getObjectSize(hsize, vsize,inches);
   submit continue;
    goptions hsize=&hsize vsize=&vsize;
   endsubmit;

 endmethod;


Chapter Contents

Previous

Next

Top of Page

Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.