Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries over the next few weeks. Thanks for all your past and future contributions.
Change the listbox item mark position
Keywords: listbox CAknSingleGraphicStyleListBox SetItemMarkPosition
This article takes CAknSingleGraphicStyleListBox as an example to describe how change the item mark position of a S60 listbox by SetItemMarkPosition()
Normally the CAknSingleGraphicStyleListBox with marks looks like this (note that the mark position is column one):
Click to download the sample app MulsList.zip
But you can change the mark position to the last column,
Click to download the sample app MulsList(2).zip
The changes include:
1. Use SetItemMarkPosition() to set the new mark position
iListBox->ItemDrawer()->SetItemMarkPosition(2); // set the new mark position
2. Update the format strings
// _LIT(KItemFormat, "1\tRecord%d\t2"); // "1\tLabel1\tIcon1"
_LIT(KItemFormat, "2\tRecord%d\t1"); // "Icon1\tLabel1\t1"
You can also compare the two sample applications to see the changes.