×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    Jan 2005
    Posts
    27

    Unhappy Alternative of CAknFilteredTextListBoxModel in series 80

    Hi, I need to create a find box in series 80. I checked the look up example in series 60, which contains a find box. My problem is that they use "CAknFilteredTextListBoxModel" class in series 60, and there isn't an equivalent CCknFilteredTextListBoxModel in series 80. Does anybody know any alternative of this class in series 80?
    Thanks in advance.

  2. #2
    Nokia Developer Expert
    Join Date
    Apr 2003
    Location
    Finland
    Posts
    425
    Hi,

    Maybe you should implement a dialog which contain CCknSearchField and CEikListBox controls.

    Br V

  3. #3
    Registered User
    Join Date
    Jan 2005
    Posts
    27
    in the series 60 lookup application, they've used:
    AknFind class in the SizeChanged method;
    CAknFilteredTextListBoxModel class,
    and CAknSerachField;

    In series 80, i just found the CCknSearch field, and created and instance; but it didn't appear on the screen. I guess i need the alternatives of AknFind and CAknFilteredTextListBoxModel to make it happen.

    Any further help or maybe code snippet is appreciated,
    Regards.

  4. #4
    Registered User
    Join Date
    Sep 2005
    Posts
    1

    Cool Re: Alternative of CAknFilteredTextListBoxModel in series 80

    Hello

    You can use the following code snippet to get the original unfiltered index from a list in series 80

    TInt index = iList->CurrentItemIndex();
    // this gives the index of the filtered list
    CTextListBoxModel *model = iList->Model();
    TPtrC displayedData = model->ItemText(index);

    //to get the original index
    MDesCArray *elements = model->ItemTextArray();
    CDesCArray *itemArray = STATIC_CAST( CDesCArray*, elements );
    TInt originalIndex;

    itemArray->Find(displayedData, originalIndex);
    return originalIndex;

    originalIndex gives the unfiltered index of the currently selected item in the filtered list

    Njoy !!

Posting Permissions

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