Chapter Contents

Previous

Next
SAS/AF Software: Class Dictionary

Using the Hotspot Class

To be effective, a regional hotspot should be created on top of an another object. The hotspot may be created on top of a portion of the object, or the hotspot may completely surround the object. With the exception of text entry objects, objects that are surrounded by a hotspot will not receive any events unless the hotspot is hidden with the _hide method. Therefore, a hotspot that is surrounded by another hotspot only works when the outer hotspot is hidden.


Defining Hotspots for Text Entry Objects

To define a hotspot for a text entry object, define the text entry fields as selectable by setting the Selection Style to ENTER/single mouse click in the Text Entry Attributes window. See the Text Entry class.


Changing Object Colors

Regional hotspots can contain color specifications to change the color of the object the hotspot overlays. For example, you can use a regional hotspot to define a selectable area on a large text entry object. When a user selects it, the area can change color and execute a program label to update a variable.

Note:    If a regional hotspot fills a region that has a background color set, the background color disappears. If the region is subsequently emptied, the background color does not reappear; the region is transparent.  [cautionend]


Manipulating the Hotspot in an SCL Program

Manipulate a hotspot in an SCL program by using its associated variable. The value of the hotspot variable is a list identifier for a list containing information about the most recently selected point on the object. You can test for the variable value in your SCL program, or you can determine the value with the _getValue method.

For example, assume a user selected one of the words in a text entry object. The list enables you to determine whether the user selected a word on the text entry object, and if so, which word it was and where it was on the text entry object. If you place a hotspot over a SAS\/GRAPH output object, you can return the number of the specific graphics segment that was selected. (This value is stored in the SCL list item SPOTID.) Hotspots assigned to graphics output are called segment hotspots. See the SAS/GRAPH Output class for more information on creating and using segment hotspots.


Chapter Contents

Previous

Next

Top of Page

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