listbox filtered by CAknSearchField

Login to reply to this topic.
Fri, 2005-04-08 15:19
Joined: 2004-08-19
Forum posts: 112
How can I learn the item actually selected in a filtered listbox (when the selection is really filtered after the user has entered some letters)? CurrentItemIndex() returns the item index inside the filtered list (eg. zero for the first item) but this tells me nothing about the index of this item in the original list.

Thanks,
 Gábor

Bye,
Gábor


Sun, 2005-04-10 21:58
Joined: 2004-08-19
Forum posts: 112
listbox filtered by CAknSearchField
Somebody else might need it one day:

Code:
TInt CurrentItem = ListBox->View()->CurrentItemIndex ();
CAknFilteredTextListBoxModel* Model = STATIC_CAST (CAknFilteredTextListBoxModel*, ListBox->Model ());
CurrentItem = Model->Filter()->FilteredItemIndex (CurrentItem);

Bye,
Gábor

Tue, 2005-04-12 07:16
Joined: 2005-03-31
Forum posts: 173
listbox filtered by CAknSearchField
why cant u use CAknSelectionListBox?

Tue, 2005-04-12 10:59
Joined: 2004-08-19
Forum posts: 112
listbox filtered by CAknSearchField
I started with those pre-made units originally, however, although they do work well as standalone dialogs, I had many difficulties with them used as views in a multi-view application. One problem I remember was that my DoActivateL's were not even called (I started a thread here about that but no real solution came in the end). As soon as I, although reluctantly, reverted back to the standard Eikon architecture instead of the view architecture, everything started to work as expected.

Bye,
 Gábor

Bye,
Gábor

Thu, 2005-06-30 10:39
Joined: 2005-06-30
Forum posts: 1
Re: listbox filtered by CAknSearchField
I´ve needed it today. Thanks, djgtram  Smiley
  • Login to reply to this topic.