Chapter Contents

Previous

Next
Text Viewer: _verifyCursor

Text Viewer: _verifyCursor



Checks to see if a given point is within one or more designated areas


Syntax
Details
Example

Syntax

CALL NOTIFY (viewer-name, '_verifyCursor', row, col, is-in, cursor-location-1<..., cursor-location-n>);

Argument Type Description
row
N specifies the row of the point to check
col
N specifies the column of the point to check
is-in
N returns a value indicating whether the point is within the area:

1 -- the point is within the area.

2 -- the point is not within the area.

cursor-location

contains all of the following numeric arguments, in this order and separated by commas:


start-row starting row of the area


start-col starting column of the area


end-row ending row of the area


end-col ending column of the area


Details

The _verifyCursor method is particularly useful when the text viewer uses a proportional font. When a proportional font is used, columns are not aligned so the _verifyCursor method is necessary to determine whether a row/column pair is within a block area. More than one area may be checked by passing more than one coordinate group to the _verifyCursor method.


Example

This example determines whether a click in the text viewer occurred within the area from row 30, column 30 to row 40, column 40:

TEXTVIEW:
   call notify('textview', '_get_info_',
                row, col);
   call notify('textview', '_verify_cursor_',
                row, col, isin,
               30, 30, 40, 40);
 return;

The is-in variable returns 1 if the click occurred in the area and 0 if it did not.


Chapter Contents

Previous

Next

Top of Page

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