Added wxComboPopup::FindItem() to help in deciding how SetValue() should change the value of a read-only wxComboCtrl. This allows wxOwnerDrawnComboBox to have the same behavior as wxComboBox in that respect.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66409 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -642,6 +642,16 @@ int wxVListBoxComboPopup::FindString(const wxString& s, bool bCase) const
|
||||
return m_strings.Index(s, bCase);
|
||||
}
|
||||
|
||||
bool wxVListBoxComboPopup::FindItem(const wxString& item, wxString* trueItem)
|
||||
{
|
||||
int idx = m_strings.Index(item, false);
|
||||
if ( idx == wxNOT_FOUND )
|
||||
return false;
|
||||
if ( trueItem != NULL )
|
||||
*trueItem = m_strings[idx];
|
||||
return true;
|
||||
}
|
||||
|
||||
unsigned int wxVListBoxComboPopup::GetCount() const
|
||||
{
|
||||
return m_strings.GetCount();
|
||||
|
||||
Reference in New Issue
Block a user