GUI ScreenIO for Windows

 ScreenIO.com


The listview-DBLCLICK event

A listview-DBL-CLICK event is returned when the user double-clicks a record in the listview. 

Data returned with this event

Required to process this event

In panel-3 area Data
listview-SEL1-KEY The value of the invisible key column for the selected record.

Returned but not used to handle this event

In panel-3 area Data
listview-MAX Maximum number records that may be passed in the listview buffer, useful for PERFORMed loops when loading records to  your listview buffer.
listview-SCROLL-TO-KEY Set to HIGH-VALUES.
listview-TOP-OF-LIST-KEY The value of the invisible key column for the first (top) record that is visible in the listview control.
All other fields Set to LOW-VALUES.
In panel-4 area Data
listview Number of items in the list that are selected.

Usual response

Use the value in listview-SEL1-KEY to read the record and do whatever is appropriate for your application.

Sample code

     PERFORM WITH TEST AFTER
         UNTIL panel-EVENT-CLOSE-WINDOW
            OR panel-EVENT-CLOSE-AND-STOP

       CALL 'GS' USING panel-1
                       panel-2
                       panel-3
                       panel-4

       EVALUATE TRUE

-->      WHEN listview-DBL-CLICK
-->        MOVE listview-SEL1-KEY TO record-KEY
-->        SET file-command-READ TO TRUE
-->        CALL file-I-O-routine USING file-commands
-->                                    data-record
-->        IF valid-file-status
-->          PERFORM display-record-for-update
-->        END-IF

           .
           .
           .

       END-EVALUATE

     END-PERFORM.


Remarks

If you modify the record, you can update the listview by loading the modified record to the listview buffer.  GUI ScreenIO will match the record's key and percentage with the records in its cache, and update the record in the cache (and display the updated data).

You cannot add or update records this way, nor can you change the key; you need to reset and reload the list to reflect additions or deletions.  This is usually quite painless because of the caching algorithm.

Related topics:


© 2000-2019 Norcom, all rights reserved 

TOC

Send feedback to Norcom