Chapter Contents |
Previous |
Next |
Hotspot: _getValue |
Syntax | |
Example |
Syntax |
CALL NOTIFY (hotspot-name, '_getValue', hot-list-id); |
Argument | Type | Description |
---|---|---|
hot-list-id |
N | returns the identifier of an SCL list containing information about the location of the most recently selected area on the hotspot. The SCL list contains the following items: |
Item Name | Type | Description |
---|---|---|
COL | N | the column of the X coordinate |
OBJNAME | C | the name of the selected object |
ROW | N | the row of the Y coordinate |
SPOTID | N | if the hotspot overlays a graph, the number of the graph segment within the graph, beginning with 1; otherwise, the value of SPOTID is -1 |
SPOTTYPE | N | a number identifying the type of graph segment selected. |
TEXT | C | the text of the selected area |
X | N | the X coordinate of the selection, in pixels |
Y | N | the Y coordinate of selection, in pixels |
Example |
Assume you have a FRAME entry that contains three buttons (labeled Default, Switch, and Hide) and a text entry object with two hotspots: a red hotspot covering the upper and lower right corners and a blue hotspot covering the upper and lower left corners. The text entry object was defined as selectable in the Text Entry Attributes window. In addition, there are two text entry fields containing the text selected in from each hotspot.
In the following example, when
Switch
is pressed, the red hotspot changes to blue and the blue hotspot changes to red. When
Hide
is pressed, the hotspots are no longer visible:
DEFAULT: /* Set up the default colors of the hotspots and display them. */ call notify('hot1','_show_hotspots_', 'red','reverse'); call notify('hot2','_show_hotspots_', 'blue','reverse'); return; SWITCH: /* Switch the currently displayed colors of the hotspots. */ call notify('hot1','_show_hotspots_', 'blue','reverse'); call notify('hot2','_show_hotspots_', 'red','reverse'); return; HIDE: /* Hide the hotspots. */ call notify('hot1','_hide_hotspots_'); call notify('hot2','_hide_hotspots_'); return; HOT1: /* Put the clicked on word in HOTFLD1 and blank out HOTFLD2. */ /* NOTE: The next line is not needed. It is just there to */ /* illustrate the _getValue method. */ call notify('hot1','_get_value_',hot1); hotfld1=getnitemc(hot1,'text'); hotfld2=_blank_; return; HOT2: /* Put the clicked on word in HOTFLD2 and blank out HOTFLD1. */ /* NOTE: The next line is not needed. It is just there to */ /* illustrate the _getValue method. */ call notify('hot2','_get_value_',hot2); hotfld1=_blank_; hotfld2=getnitemc(hot2,'text'); return;
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.