ProvideX V8.20 > Language Reference > 7. Control Object Properties
725
READ DATA FROM G1'_PropValues$ TO IOL=MYIOL
MYIOL: IOLIST Col, Row, Value$
To set values, first set '_PropList$ (if not already set), then set '_PropValues$; e.g.,
G1'_PropValues$ = "1"+SEP+"2"+SEP+"Data"
or G1'_PropValues$ = REC(IOL=MYIOL)
The advantage is that only one packet need be sent to WindX / JavX to either SET or
RETRIEVE the values of multiple properties. Do not constantly read fields
'_PropList$ and '_PropSep$ from the control in order to parse the data returned by
'_PropValues$. This would defeat the purpose; e.g.,
READ DATA FROM G1'_PropValues$,SEP=G1'_PropSep$
TO IOL=CPL("IOLIST "+G1'_PropList$)
The above example actually results in three exchanges with WindX: one to get
'_PropSep$, the second for '_PropList$, and the third for '_PropValues$. The
separator character and list should be maintained within the application code and
should not be retrieved from the control.
Load on Demand (List Box, List View)
The following properties are used to improve list box load times:
`Itemcount
Defines number of items.
`ItemNeededCtl
CTL issued when data needed.
`ItemNeededFrom
Lowest item needed.
`ItemNeededTo
Highest item needed.
On-demand loading allows an application to load a list box with only those items
the user actually scrolls into view. This reduces network traffic and file access since a
list box is only loaded with those items required by the user. Also, it assures proper
function of the scrollbar and its relationship to the list.
This feature requires the developer to pre-declare the number of items that the list
box is to have (by setting the 'ItemCount property). When the user scrolls items into
view, the system generates a CTL event.
Upon receiving the CTL event (set by 'ItemNeededCtl), the application queries
`ItemNeededFrom and `ItemNeededTo to determine the index number and the
number of items. The application then loads the list box with the contents of the
specified items by setting 'Item and 'ItemText$. If no elements are needed then
'ItemNeededFrom and 'ItemNeededTo will be zero. Once the value has been
loaded into the 'ItemNeededTo, ProvideX checks if further items are required and if
so, it generates another CTL event.
In the case of a Report style list view, should the user request the list be sorted or
attempt to auto-size the width of a column, the system will force a load of all list box
elements before processing the request.