GUI ScreenIO for Windows |
GUI ScreenIO can return a number of events associated with a listview. The links take you to pages which discuss the events individually, in great detail, along with sample code demonstrating how to handle them.
All programs that use listviews must correctly handle the three mandatory events in the table below.
There are only two exceptions to this rule:
In reality, it's not that difficult to handle these events, and a program that correctly handles these events is capable of displaying lists with any number of records, up to the present listview maximum of 999,999,999 (one less than a billion) records.
Mandatory Event | Cause/Program response required |
listview-GET-NEXT | The listview needs data beyond that presently in its
cache. This typically occurs when the user attempts to scroll
forward, beyond the data you have currently loaded to the listview.
Position your file to the key in listview-GET-FROM-KEY and read from there forward, loading items to your listview buffer from 1 to n, including the item with the key in listview-GET-FROM-KEY. |
listview-GET-PRIOR | The listview needs data before that presently in its
cache. This typically occurs when the user attempts to scroll
backwards, beyond the data you have currently loaded to the listview.
Position your file to the key in listview-GET-FROM-KEY and read from there backwards, loading items to your listview buffer from n to 1 (backwards), including the item with the key in listview-GET-FROM-KEY. |
listview-START-AT | The user dragged the scrollbar to a point outside of the
currently cached data.
Position your file to the percentage along the keypath found in listview-START-AT-PERCENT and read from there forward, loading items to your listview buffer from 1 to n as you would for a listview-GET-NEXT event. |
Your program can ignore these events without causing problems.
Event | Cause/Program response required |
listview-B | The user selected a different item in the listview, and you specified that you wanted to receive an event when the selected item changed. |
listview-CLICKCOLn | The user clicked the heading of column n.
You would typically sort your list by that column, reset the listview, and reload the list. |
listview-DBLCLICK | The user double-clicked an item.
You would probably read the record for update and display it in a popup dialog box so the user could modify the data. |
listview-EDITED | The user slow-clicked column 1 of a list item and changed
the contents.
Update the record with the new column 1 data modified by the user. |
listview-SELECTION | Not presently implemented; reserved for interrogating the listview when multiple items are selected. |
© 2000-2019 Norcom, all rights reserved |