Click or drag to resize

ListView.GetNextItem Method (Typed)

X#
Retrieve the next list view item that possesses all of the specified properties.

Namespace:  XSharp.VO.SDK
Assembly:  XSharp.VOGUIClasses (in XSharp.VOGUIClasses.dll) Version: 2.19
Syntax
 VIRTUAL METHOD GetNextItem(
	kRelationship,
	lDisabled,
	lDropTarget,
	lFocused,
	lSelected,
	nItemStart
) AS USUAL CLIPPER
Request Example View Source

Parameters

kRelationship (Optional)
Type: Usual
One of the following constants describing the physical relationship to the specified item. See table below for possible values
lDisabled (Optional)
Type: Usual
A value of TRUE indicates that the list view item's image should be disabled. If omitted, the default is FALSE.
lDropTarget (Optional)
Type: Usual
A value of TRUE indicates that the list view item should be a drag and drop target. If omitted, the default is FALSE.
lFocused (Optional)
Type: Usual
A value of TRUE indicates that the list view item should be focused. If omitted, the default is FALSE.
lSelected (Optional)
Type: Usual
A value of TRUE indicates that the list view item should be selected. If omitted, the default is FALSE.
nItemStart (Optional)
Type: Usual
Index of the item with which to begin searching. If omitted, searching starts from the beginning.

Return Value

Type: Usual
The list view item returned as a result of the search.
Remarks
ConstantDescription
LV_GNIABOVESearches for an item that is above the specified item
LV_GNIBELOWSearches for an item that is below the specified item
LV_GNIBYITEMSearches for a subsequent item by index (the default value)
LV_GNILEFTSearches for an item to the left of the specified item
LV_GNIRIGHTSearches for an item to the right of the specified item
Examples
The example below shows how to traverse all items in a ListView for further processing. Note that the GetNextItem() method's last parameter is zero-based:
X#
1LOCAL oLVI    AS ListViewItem
2nCount        := SELF:oDClvPlayers:ItemCount
3FOR x := 1 UPTO nCount
4oLVI        := SELF:oDClvPlayers:GetNextItem( LV_GNIBYITEM,,,,,x-1 )
5cID        := AllTrim( oLVI:GetText( #cPlayerID ) )
6nRecNo    := oLVI:GetValue( #cPlayerID )
7NEXT x
See Also