×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    May 2006
    Posts
    1

    search field to text mode

    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 );
    iListBox->ActivateL();
    iSearchField->ActivateL();

    // 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?

  2. #2
    Registered User
    Join Date
    Mar 2003
    Location
    Sweden
    Posts
    26

    Re: search field to text mode

    Hi,

    Have you included your search field in ComponentControl()?

    /JN

Similar Threads

  1. EEventKey + listbox + search field
    By egeri in forum Symbian User Interface
    Replies: 16
    Last Post: 2009-06-09, 10:26
  2. Notifications of changing text input mode
    By GuusDavidson in forum Symbian User Interface
    Replies: 0
    Last Post: 2005-11-07, 05:05
  3. Replies: 0
    Last Post: 2004-11-24, 18:49
  4. Howto send LF in text mode SMS
    By Royessers in forum General Messaging
    Replies: 2
    Last Post: 2003-06-12, 09:47
  5. Text field entry duplicate key strokes
    By gwhistance in forum Mobile Java General
    Replies: 1
    Last Post: 2002-12-18, 11:05

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×