version of wxListCtrk.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43720
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
if (m_genericImpl)
return m_genericImpl->FindItem(start, str, partial);
if (m_genericImpl)
return m_genericImpl->FindItem(start, str, partial);
+ 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'
}
// Find an item whose data matches this data, starting from the item after 'start'
if (m_genericImpl)
return m_genericImpl->FindItem(start, data);
if (m_genericImpl)
return m_genericImpl->FindItem(start, data);
+ long idx = start;
+ if (idx < 0)
+ idx = 0;
long count = GetItemCount();
while (idx < count)
long count = GetItemCount();
while (idx < count)
}
// Find an item nearest this position in the specified direction, starting from
}
// Find an item nearest this position in the specified direction, starting from