Issues related to CAknListQueryDialog for S60 5th Ed
I am facing an issue with multiple selection in CAknListQueryDialog . The list displays fine but whenever I touch any item in the dialog it returns itself with an empty index array. Only the first item is selected on touching it. Only way of making it work is to hold the item you wish to select and scroll the list a little bit and again select the item but this only makes a single section there is no way I can use it for multiple selection. Here is the code used.
The Resource file
RESOURCE DIALOG r_aknexquery_multi_selection_query
flags = EGeneralQueryFlags;
buttons = R_AVKON_SOFTKEYS_OK_CANCEL;
type = EAknCtListQueryControl;
id = EListQueryControl;
control = AVKON_LIST_QUERY_CONTROL
listtype = EAknCtSingleGraphicPopupMenuListBox;
listbox = LISTBOX
flags = EAknListBoxMultiselectionList;
height = AKNEXQUERY_LISTBOX_HEIGHT;
width = AKNEXQUERY_LISTBOX_WIDTH;
array_id = r_aknexquery_multi_selection_query_list_item;
heading = STRING_r_aknexquery_selection_title;
The instantiation and execution of the dialog
indexArray = new ( ELeave ) CArrayFixFlat<TInt>( 6 );
CleanupStack::PushL( indexArray );
dlg = new ( ELeave ) CAknListQueryDialog( indexArray );
TInt answer( dlg->ExecuteLD( R_AKNEXQUERY_MULTI_SELECTION_LIST_QUERY) );
Any idea how can I solve this issue. I am also facing the same error in S60 example code present at \S60_5th_Edition_SDK_v1.0\S60CppExamples\Query
Re: Issues related to CAknListQueryDialog for S60 5th Ed
Finally got the solution.
Nokia had released 2 new flags for enabling listbox for touch events. One of them is EAknListBoxStylusMultiselectionList.
If we use this flag then everything works fine. SO in Rss file replace flags = EAknListBoxMultiselectionList; with flags = EAknListBoxStylusMultiselectionList to fix the issue.