A while ago someone wanted a dialog that looked and acted like the dialog for
the message details in the messaging application (
see)
What they were looking for is something like this... (thanks payu.sergey for the picture)
Unfortunately I wrote an implementation for someone else that I could not reused so I looked
at it again over Xmas to see if there was anything that could be salvaged.

I realized there are two ways to do this, one with a CAknSelectionListDialog and one with
a CAknPopupList. The second one which I missed in the original implementation is much
simpler.
We are only going to cover the second one as its a little over 70 lines of code in total.
The real trick to solving this problem is realizing how to tackle it.
First, what kind of listbox you are we looking at.
In this case it is a single heading style list box.
The single means that it takes one line and the heading means that the list box
is split into two halves, the one is the caption and the other is the text. Also, the
caption will be in the normal font and the text in bold font, which kind of helps us
decide that this is indeed a listbox.
Next is what to do if we have a very long string we need to split it into
different lines and then make sure the line with the split text goes into the correct
column.
For example
HeadingtThis is some very long text
would split into two lines
HeadingtThis is some
tvery long text
Finally the only thing we need to know is how big the column is for the heading and
the the text. We are lucky in that these can be obtained from the listbox, before the
listbox is displayed, allowing us to get the width and the font to be used based on the
LAF specification so it complies with the skins API and locale etc.
So now we know how to create the listbox, its container, the font , widths and how to
split the content.
Next time we will go through the code on how it was done.
.