NativeListControl

Class Overview
Provides operations on windows of WindowClass type SysListView32.



public NativeListControl(WindowControl src)
Explanation
Constructor.

Parameter
        src
        
    The original window control.



public NativeListControl(WindowsAppFriend app, IntPtr windowHandle)
Explanation
Constructor.

Parameters
app
Application manipulation object
windowHandle
Window handle



public int ItemCount{get;}
Explanation
Returns the number of items in the control.



public int[] SelectedIndices{get;}
Explanation
Returns the currently selected indices.



public int TopIndex{get;}
Explanation
Returns the index of the top item displayed in the list control.



public View View{get;}
Explanation
Returns the display mode.



public void EmulateCancelEdit()
Explanation
Cancels editing.




public void EmulateCancelEdit(Async async)
Explanation
Cancels editing asynchronously.

Parameter
async
Asynchronous execution object.



public void EmulateChangeItem(LVITEM item)
Explanation
Changes the contents of an item.
Causes a notice according to the changes.

Parameter
item
Item



public void EmulateChangeItem(LVITEM item, Async async)
Explanation
Changes the contents of an item.
Causes a notice according to the changes.
Executes asynchronously.

Parameters
item
Item
async
Asynchronous execution object



public void EmulateChangeItemState(int itemIndex, LVIS mask, LVIS state)
Explanation
Changes an item's state.
Causes an LVN_ITEMCHANGING and LVN_ITEMCHANGED notice.

Parameters
itemIndex
Index of the item to change
mask
State mask
state
State


public void EmulateChangeItemState(int itemIndex, LVIS mask, LVIS stateAsync async)
Explanation
Changes an item's state.
Causes an LVN_ITEMCHANGING and LVN_ITEMCHANGED notice.
Executes asynchronously.

Parameters
itemIndex
Index of the item to change
mask
State mask
state
State
async
Asynchronous execution object



public void EmulateEdit(int itemIndex, string text)
Explanation
Edits an item in the list.
Causes an LVN_BEGINLABELEDIT and LVN_ENDLABELEDIT notification.

Parameters
itemIndex
Index of the item to change
text
Text to set



public void EmulateEdit(int itemIndex, string textAsync async)
Explanation
Edits an item in the list.
Causes an LVN_BEGINLABELEDIT and LVN_ENDLABELEDIT notification.
Executes asynchronously.

Parameters
itemIndex
Index of the item to change
text
Text to set
async
Asynchronous execution object



public void EmulateSelect(int itemIndex, bool isSelect)
Explanation
Changes the selection state of an item.
Causes an LVN_ITEMCHANGING and LVN_ITEMCHANGED notification.

Parameters
itemIndex
Index of the item
isSelect
State to set



public void EmulateSelect(int itemIndex, bool isSelectAsync async)
Explanation
Changes the selection state of an item.
Causes an LVN_ITEMCHANGING and LVN_ITEMCHANGED notification.
Executes asynchronously.

Parameters
itemIndex
Index of the item
isSelect
State to set
async
Asynchronous execution object



public void EnsureVisible(int itemIndex, bool partialOK)
Explanation
Displays the indicated item in a visible region.

Return value
Success or failure

Parameters
itemIndex
Index of the item
           partialOK
                     Indicates whether partial display is permissible



public int FindItem(int findStart, int targetSubItemIndex, string text)
Explanation
Finds an item with the indicated text.

Return value
Index of the item found.
Returns -1 if the item was not found.

Parameters
findStart
Index where searching should start.
          targetSubItemIndex             
                     Sub-item index of the target item.
text
Text to search for



public bool GetColumn(int col, LVCOLUMN column)
Explanation
Obtains column information.

Return value
Success or failure

Parameters
col
Column
column
Column information



public bool GetItem(LVITEM item)
Explanation
Obtains an item.

Return value
Success or failure

Parameter
item
The item



public LVITEM GetItemData(int itemIndex)
Explanation
Returns item data

Return value
Item data

Parameter
itemIndex
        Index of the item


public Rectangle GetItemRect(int itemIndexLVIR area)
Explanation
Returns an item's bounds

Return value
Item rectangle

Parameters
itemIndex
Index of the item
area
                      Specifies for which portion bounds should be obtained



public LVIS GetItemState(int itemIndex, LVIS stateMask)
Explanation
Obtains an item's state

Return value
Item state

Parameters
itemIndex
Index of the item
stateMask
State mask



public string GetItemText(int itemIndex, int subItemIndex)
Explanation
Gets the text for an item.

Return value
Item text.

Parameters
itemIndex
Index of the item
subItemIndex
Sub-item index



public Rectangle GetSubItemRect(int itemIndex, int subItemIndex, LVIR area)
Explanation
Returns the bounds of a subitem.

Return value
Subitem rectangle

Parameters
itemIndex
Index of the item
subItemIndex
Sub-item index
area
                      Specifies for which portion bounds should be obtained
 
JR