Progress
Language Reference


LIST-EVENTS Function

Interfaces
OS
SpeedScript
All
All
No

Returns a comma-separated list of the valid events for a specified object or widget.

SYNTAX

LIST-EVENTS ( widget-handle [ , platform ] ) 

widget-handle

A handle to a valid object or widget. The function returns a list of the events that are valid for that object or widget.

platform

A character-string value that specifies a display type. Valid values are GUI and TTY. Some events are valid only on certain platforms. If you omit the platform parameter, Progress uses the platform for the current session.

EXAMPLE

The following example uses the LIST-EVENTS function to populate a selection list with all the valid events for a widget. When you run this procedure, type ? at any time to see a list of valid events for the widget that currently has focus.

r-levent.p
DEFINE VARIABLE inv-price LIKE item.price.
DEFINE VARIABLE inv-value LIKE item.price.
DEFINE VARIABLE report-type AS INTEGER INITIAL 1.

DEFINE VARIABLE event-list AS CHARACTER VIEW-AS SELECTION-LIST
                           INNER-CHARS 20 INNER-LINES 5
                           SCROLLBAR-VERTICAL.

DEFINE BUTTON ok-butt LABEL "OK" AUTO-GO.
DEFINE BUTTON cancel-butt LABEL "CANCEL" AUTO-ENDKEY.
      
FORM
   inv-price LABEL "Price"
      AT ROW 1.25 COLUMN 2
   report-type LABEL "Report Sorted ..."
      AT ROW 2.25 COLUMN 2 
      VIEW-AS RADIO-SET RADIO-BUTTONS "By Catalog Page",   1,
                                      "By Inventory Value", 2
   SKIP
   ok-butt cancel-butt
   WITH FRAME select-frame SIDE-LABELS.

FORM
   event-list
   WITH FRAME list-frame NO-LABELS TITLE "Events" WIDTH 30.

ON ? ANYWHERE
  DO:
     FRAME list-frame:TITLE = "Events for " + FOCUS:TYPE. 
     event-list:LIST-ITEMS IN FRAME list-frame = LIST-EVENTS(FOCUS).
     DISPLAY event-list WITH FRAME list-frame.
     ENABLE event-list WITH FRAME list-frame.
     RETURN NO-APPLY.  
END.

ENABLE ALL WITH FRAME select-frame.

WAIT-FOR WINDOW-CLOSE OF CURRENT-WINDOW. 

SEE ALSO

LAST-EVENT System Handle, LIST-QUERY-ATTRS Function, LIST-SET-ATTRS Function, LIST-WIDGETS Function, VALID-EVENT Function


Copyright © 2004 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095