// Copyright: (c) Stefan Csomor
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
// Copyright: (c) Stefan Csomor
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
if ( !wxControl::Create( parent, id, pos, size, style, validator, name ) )
return false;
if ( !wxControl::Create( parent, id, pos, size, style, validator, name ) )
return false;
wxASSERT_MSG( !(style & wxCB_SORT),
"wxCB_SORT not currently supported by wxOSX/Cocoa");
wxASSERT_MSG( !(style & wxCB_SORT),
"wxCB_SORT not currently supported by wxOSX/Cocoa");
// ----------------------------------------------------------------------------
void wxComboBox::DoSetItemClientData(unsigned int n, void* clientData)
{
// ----------------------------------------------------------------------------
void wxComboBox::DoSetItemClientData(unsigned int n, void* clientData)
{
- wxASSERT_MSG( "wxComboBox::FindString() doesn't currently support case "
- "insensitive search in wxOSX/Cocoa");
+ if (!bCase)
+ {
+ for (unsigned i = 0; i < GetCount(); i++)
+ {
+ if (s.IsSameAs(GetString(i), false))
+ return i;
+ }
+ return wxNOT_FOUND;
+ }
{
wxCommandEvent event(wxEVT_COMMAND_COMBOBOX_SELECTED, m_windowId );
event.SetInt(GetSelection());
{
wxCommandEvent event(wxEVT_COMMAND_COMBOBOX_SELECTED, m_windowId );
event.SetInt(GetSelection());
wxComboWidgetImpl* wxComboBox::GetComboPeer() const
{
return dynamic_cast<wxComboWidgetImpl*> (m_peer);
wxComboWidgetImpl* wxComboBox::GetComboPeer() const
{
return dynamic_cast<wxComboWidgetImpl*> (m_peer);