Selection list with find
| Sat, 2005-01-29 16:40 | |
|
I have a dialog with the following resource, straight from the book: Code: RESOURCE DIALOG r_dialog { flags = EAknDialogSelectionList; buttons = R_AVKON_SOFTKEYS_OPTIONS_EXIT; items = { DLG_LINE { type = EAknCtSingleListBox; id = ESelectionListControl; control = LISTBOX { flags = EAknListBoxSelectionList; }; }, DLG_LINE { itemflags = EEikDlgItemNonFocusing; id = EFindControl; type = EAknCtSelectionListFixedFind; } }; } Also, I call it as shown in the examples, and I also set Code: Container->SetupFind (CAknSelectionListDialog::EFixedFind); My problem is that, although the dialog works all right, the find field only appears when I start entering letters. I'd prefer to have it on screen constantly like in the built-in Contacts. I thought that FixedFind, in contrast to PopupFind, was supposed to do this but it doesn't seem to work that way. Thanks, Gabor Bye, |
|






Forum posts: 2
I also have the same problem. anybody find the solution for this.
thx
born
Forum posts: 112
Bye,
Gábor
Bye,
Gábor
Forum posts: 34
I have an another trick. Findbox also will visible when list query is appeared.
This method is better than above from djgtram, as listbox will reduce lines count automaticaly when findbox is appeare.
void CSelectionFindBoxDialog::ActivateL()
{
CAknSelectionListDialog::ActivateL();
TKeyEvent charEvent;
charEvent.iCode = '*';
charEvent.iScanCode = '*';
//make visible findbox in standard way(when key pressed)
FindBox()->OfferKeyEventL ( charEvent, EEventKeyDown );
FindBox()->OfferKeyEventL ( charEvent, EEventKey );
FindBox()->OfferKeyEventL ( charEvent, EEventKeyUp );
//clear findbox and refresh listbox search results
FindBox()->SelectSearchTextL();
charEvent.iCode = EKeyDelete;
charEvent.iScanCode = EStdKeyDelete;
FindBox()->OfferKeyEventL ( charEvent, EEventKeyDown );
FindBox()->OfferKeyEventL ( charEvent, EEventKey );
FindBox()->OfferKeyEventL ( charEvent, EEventKeyUp );
}