if (m_genericImpl)
return m_genericImpl->FindItem(start, str, partial);
- return -1;
+ wxString str_upper = str.Upper();
+
+ long idx = start;
+ if (idx < 0)
+ idx = 0;
+ long count = GetItemCount();
+
+ while (idx < count)
+ {
+ wxString line_upper = GetItemText(idx).Upper();
+ if (!partial)
+ {
+ if (line_upper == str_upper )
+ return idx;
+ }
+ else
+ {
+ if (line_upper.find(str_upper) == 0)
+ return idx;
+ }
+
+ idx++;
+ };
+
+ return wxNOT_FOUND;
}
// Find an item whose data matches this data, starting from the item after 'start'
if (m_genericImpl)
return m_genericImpl->FindItem(start, data);
- long idx = start + 1;
+ long idx = start;
+ if (idx < 0)
+ idx = 0;
long count = GetItemCount();
while (idx < count)
idx++;
};
- return -1;
+ return wxNOT_FOUND;
}
// Find an item nearest this position in the specified direction, starting from
}
else
{
- event.m_itemIndex = (long)itemID;
+ event.m_itemIndex = (long)itemID-1;
}
switch (message)