The window xposition of and window yposition of functions can be applied to all regions. For a graphical region, the values window returned are the X and Y coordinates of the origin of the graphical region's window, and are in the graphical region's own coordinates. If ESL returns values of zero for these functions, you may have inquired about a key, dialog box, or dialog control object.
In the following example, the user wants to pan the window of Book to the left, so that more of Book to the left can be seen. After doing this, the program checks to see if further requests to pan left are meaningful; if there are no more contents to the left, the program makes the key PanLeft invisible. Also, the program checks to see if requests to pan right are meaningful; if there are contents to the outside of the window, the program makes the key PanRight visible. Note that (window position + window xsize) is the right edge of the window.
response to PanLeft
change Book window position by (-StepSize) 0
if ((window xposition of Book) <= left of Book)
then
make PanLeft invisible
end if
if ((window xposition of Book +
window xsize of Book) < right of Book) then
make PanRight visible
end if