Chapter Contents

Previous

Next
Scroll Bar: _getSize

Scroll Bar: _getSize



Returns the size of a scroll bar's thumb


Syntax
Details
Example

Syntax

CALL NOTIFY (scroll-bar-name, '_getSize', thumb-size);

Argument Type Description
thumb-size
N returns the size of the scroll bar's thumb in multiples of the increment value


Details

The value returned by the _getSize method is the page size, or the amount of data that is automatically scrolled through when users click either side of the thumb in the scroll bar.


Example

The following example uses a scroll bar to obtain data points within the range of -2.20 to +2.20 in increments of 0.10. A Zoom button, when pressed, halves the current increment value, and an UnZoom button doubles the increment value.

INIT:
   call notify('sbar1','_set_min_',-2.20);
   call notify('sbar1','_set_max_',2.20);
   call notify('sbar1','_set_inc_',0.10);
   call notify('sbar1','_set_size_',5);
   sbar1 = 0;
return;

ZOOM:
      /* halve the current increment */
      /* doubling the thumb size leaves  */
      /* it unchanged visually */
   call notify('sbar1','_get_inc_',inc);
   call notify('sbar1','_set_inc_',inc/2);
   call notify('sbar1','_get_size_',thumb);
   call notify('sbar1','_set_size_',thumb*2);
return;

UNZOOM:
      /* double the current increment */
      /* halving the thumb size leaves  */
      /* it unchanged visually */
   call notify('sbar1','_get_inc_',inc);
   call notify('sbar1','_set_inc_',inc*2);
   call notify('sbar1','_get_size_',thumb);
   call notify('sbar1','_set_size_',thumb/2);
return;


Chapter Contents

Previous

Next

Top of Page

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