Revision as of 08:59, 18 September 2012 by hamishwillee (Talk | contribs)

Change the listbox item mark position

From Nokia Developer Wiki
Jump to: navigation, search
Article Metadata
Code ExampleArticle
Created: chenziteng (27 Sep 2009)
Last edited: hamishwillee (18 Sep 2012)

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()

Source Code

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

void CMulsListContainer::SizeChanged()
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.

61 page views in the last 30 days.

Was this page helpful?

Your feedback about this content is important. Let us know what you think.


Thank you!

We appreciate your feedback.