I have created a CAknSearchField for a listbox. Implementation is based on listbox example in sdk (2.6). No resources were used.
Problem is, the search field only accepts numeric input. I have tried to set it to text mode, but nothing I've tried has worked.
/*.h: CAknDoubleLargeStyleListBox* iListBox; */
CAknFilteredTextListBoxModel* model =
static_cast<CAknFilteredTextListBoxModel*>( iListBox->Model() );
iSearchField = CAknSearchField::NewL( *this, CAknSearchField::EPopup,
NULL, 30 );
CleanupStack::PushL( iSearchField );
model->CreateFilterL( iListBox, iSearchField );
CleanupStack::Pop( iSearchField );
iSearchField->MakeVisible( ETrue );
iSearchField->SetFocus( ETrue );
AknFind::HandlePopupFindSizeChanged( this, iListBox, iSearchField );
// trying to set text mode here
CEikEdwin& editor = iSearchField->Editor();
editor.SetAknEditorAllowedInputModes( EAknEditorTextInputMode );
editor.SetAknEditorInputMode( EAknEditorTextInputMode );
editor.SetAknEditorCurrentInputMode( EAknEditorTextInputMode );
The sdk example on which this is based works as supposed, but I'm only getting numbers in the search field with my code. I even copy-pasted the example code and modified it slightly to fit my code, but still the same.
There have been similar questions before it seems, has someone figured this out?