Patch #581167
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16181 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1313,14 +1313,22 @@ long wxListCtrl::FindItem(long start, const wxString& str, bool partial)
|
|||||||
|
|
||||||
// Find an item whose data matches this data, starting from the item after 'start'
|
// Find an item whose data matches this data, starting from the item after 'start'
|
||||||
// or the beginning if 'start' is -1.
|
// or the beginning if 'start' is -1.
|
||||||
|
// NOTE : Lindsay Mathieson - 14-July-2002
|
||||||
|
// No longer use ListView_FindItem as the data attribute is now stored
|
||||||
|
// in a wxListItemInternalData structure refernced by the actual lParam
|
||||||
long wxListCtrl::FindItem(long start, long data)
|
long wxListCtrl::FindItem(long start, long data)
|
||||||
{
|
{
|
||||||
LV_FINDINFO findInfo;
|
long idx = start + 1;
|
||||||
|
long count = GetItemCount();
|
||||||
|
|
||||||
findInfo.flags = LVFI_PARAM;
|
while (idx < count)
|
||||||
findInfo.lParam = data;
|
{
|
||||||
|
if (GetItemData(idx) == data)
|
||||||
|
return idx;
|
||||||
|
idx++;
|
||||||
|
};
|
||||||
|
|
||||||
return ListView_FindItem(GetHwnd(), (int) start, & findInfo);
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Find an item nearest this position in the specified direction, starting from
|
// Find an item nearest this position in the specified direction, starting from
|
||||||
|
Reference in New Issue
Block a user