Language Reference Guide : 4. System Classes : SpriteDescriptor Class : Response Attribute
 
Share this page                  
Response Attribute
Data Type: integer
4GL Access: RW
The Response attribute specifies the intrinsic or user-defined behavior this sprite will exhibit when triggered.
Intrinsic behaviors require no 4GL code at runtime (although you can use 4GL code to tune or exploit their behaviors).
User-defined behaviors must use response values greater than 100. For more information about how to define the trigger-response behavior for a sprite, see the RequestManager RespondToRequest Method.
Response behaviors are exclusive; they cannot be combined, unlike Flags behaviors.
The special case of SpriteSourceIndex = 0 applies the Response behavior to the field itself (see the SpriteDescriptor class introduction and SpriteSourceIndex Attribute); only RSP_DRAG can be used with this setting.
Valid system-defined values are:
RSP_DRAG
Specifies that the sprite or field can be dragged by the mouse to another location.
This is useful when you want to see the field move during the drag (when fields are dragged using the FB_MOVEABLE setting, the field does not relocate until the mouse is released); use SpriteSourcIndex=0 to move the field.
It is less useful when dragging sprites, as the drag is often secondary to the real behavior they should exhibit, and combination Responses are not possible: in this case, use Flags to set the drag behavior.
For more information about using the RSP_DRAG setting, see the SpriteDescriptor class introduction and the Flags Attribute.
RSP_DROPMENU
Specifies that a menu associated with this field is dropped down when this sprite is clicked.
If the field has a property option menu defined, this will automatically drop down unless you have provided an alternative menu. For more information about how to do this, see the RequestManager RespondToRequest Method.
RSP_DROPCHOICE
Specifies that a choicelist associated with this field is dropped down when this sprite is clicked.
For more information about how to associate a choicelist with a field and sprite action, see the RequestManager RespondToRequest Method.