Version 6.3.13 for Windows
 —  Dialog Component Reference  —

INQ-FORMAT-AVAILABLE Action

This document covers the following topics:


Description

Queries whether data is available in the specified format on the Windows or drag-drop clipboard. If a drag-drop operation is in progress, the drag-drop clipboard (the local clipboard belonging to the source process) is preferentially queried, otherwise the Windows clipboard is queried.

The result of the query can be used to determine whether Paste commands should be enabled or disabled, or whether a drop is allowed during a drag-drop operation.

For more information on clipboard formats, see the SET-CLIPBOARD-DATA action.

Top of page

Parameters

Name/Data Type Explanation
Format (A253) Input

Clipboard Natural data format. Can be standard numerc string for predefined formats (e.g., CF-TEXT) or user-defined string for private formats.

Exists (L) Output

Returns TRUE if data is available in the specfied format, or FALSE otherwise.

Response (I4) Output

Natural error (if applicable).

Example:

 
DEFINE DATA LOCAL
1 #AVAIl (L)
1 #RESPONSE (I4)
1 #CONTROL HANDLE OF GUIEND-DEFINE
*
* The following example demonstrates a typical DRAG-ENTER event handler
*
PROCESS GUI ACTION INQ-FORMAT-AVAILABLE WITH CF-TEXT #AVAIL
  GIVING #RESPONSE
*
* Allow or disallow drop based on clipboard format availability
*
#CONTROL := *CONTROL
IF #AVAIL
  #CONTROL.SUPPRESS-DRAG-DROP-EVENT := NOT-SUPPRESSED
ELSE
  #CONTROL.SUPPRESS-DRAG-DROP-EVENT := SUPPRESSED
END-IF

 

Top of page