Selection list with find

Login to reply to this topic.
Sat, 2005-01-29 16:40
Joined: 2004-08-19
Forum posts: 112
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,
Gábor


Tue, 2006-03-14 13:31
Joined: 2006-03-14
Forum posts: 2
Re: Selection list with find
Hi,

I also have the same problem. anybody find the solution for this.

thx
born
Tue, 2006-03-14 13:56
Joined: 2004-08-19
Forum posts: 112
Re: Selection list with find
Well, it was more than a year ago... I think it was calling FindBox->MakeVisible (ETrue) and FindBox->SetFocus (ETrue) from the container's ConstructL () that finally did the trick.

Bye,
  Gábor

Bye,
Gábor

Sun, 2007-11-18 23:19
Joined: 2006-06-27
Forum posts: 34
Re: Selection list with find

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 );
}

  • Login to reply to this topic.