The cakndoublestylelistbox list is used during the test.
First, add the eaknlistboxmarkablelist when constructing the list:
Ilistbox-> constructl (this, eaknlistboxmarkablelist );
Or do not use this sentence directly in the RSS file:
Resource ListBox r_contact_list_box_list_box
{
Flags = eaknlistboxmarkablelist;
}
Second:
Add list icon
Void clisttolistbox: setuplistboxiconsl ()
{
_ Partition (kmlfile, "Z: // resource // apps // Multiviews. MBM ");
Ceikonenv * eikonenv = ceikonenv: static ();
Tfilename mbmfile (kmlfile );
Carrayptr <cgulicon> * icons = new (eleave) cakniconarray (3 );
Cleanupstack: pushl (icons );
Icons-> appendl (eikonenv-> createiconl (mbmfile, embmmultiviewslist_icon,
Embmmultiviewslist_icon_mask ));
// Icons-> appendl (eikonenv-> createiconl (mbmfile, embmmarkliststar, embmmarkliststarmask ));
Cleanupstack: Pop (icons );
Ilistbox-> itemdrawer ()-> formattedcelldata ()-> seticonarray (icons );
If (icons! = NULL)
{
Ilistbox-> itemdrawer ()-> columndata ()-> seticonarray (icons );
}
}
Finally:
Add a list tag related menu,
Add
.....
Menu_title
{
Menu_pane = r_avkon_menupane_markable_list;
}
.....
Process the menu command
Case eakn1_mark:
Case eakncmdunmark:
Case eaknmarkall:
Case eaknunmarkall:
{
Iappcontainer-> handlemarkcommandl (acommand); // transfer to the Container Control
Break;
}
You can.
In addition:
Const clistboxview: cselectionindexarray * selection =
Ilistbox-> selectionindexes ();
You can obtain the index value array of the marked item.