This page was last modified 10:48, 15 June 2007.
Talk:List box example
From Forum Nokia Wiki
I don't think it makes sense to delete and re-create the listbox every time the framework calls SizeChanged() on the container. It should be enough to create the listbox once in the ConstructL() and then call DrawDeferred() in SizeChanged(). There was also a call to a leaving function in SizeChanged() which is non-leaving. I added a TRAP_IGNORE just to cover it up, but the whole thing should be fixed.
Also calling DrawNow() at the end of ConstructL() is not a good idea. Window server will draw the the container in due time, you should not force it. You should try to avoid ever calling DrawNow() unless it is really necessary.
This is not a very good example of how listboxes should be used.
- Marko
