I have a CEikColumnListBox in my application. When I start the application the items of the list are not visible. However, if I scroll the list, the parts that come from "under" the frame, are visible.
My application is on Series 90 but it is very likely, that it has nothing to do with it. Instead I think that it has something to do with the order of drawing, because the list goes white again if I call DrawNow() or Draw Deferred() to the view, where the list is. However, calling those to the list doesn't help.
I also have another problem with the list: the vertical scrollbar doesn't work (horizontal works fine). Nothing happens if I tap the arrowhead of the scrollbar. I can drag the scroller of the scrollbar and it moves but the list doesn't move.
Here is the code where I create the list:
iListBox = new (ELeave) CEikColumnListBox();
CleanupStack::PushL(iListBox);
iListBox->ConstructL(STATIC_CAST(CCoeControl*, this));
CleanupStack::Pop();
and are the other controls in the container drawn correctly?
Maybe you have missed these in YourContainer::ConstructL():
SetRect(aRect);
ActivateL();
MakeVisible(ETrue);
and are you sure that iSongArray already contains some items?
and one more comment: You should never put member variable to the cleanupstack: CleanupStack::PushL(iListBox); if there are problems it will be deleted twice, and the application will panic!!
Dear Friends ,
I m struggling to create a List Box.
I select a menu item.Now i want to create a List Box.
What all classes do i need to make ? what code shall i write in APPUI. Also How to handle the view( i have one MyAppView Class).If i need a seperate view , How to create it and use it to show list box.
please look in SDK's help and examples. There is one called ListBox and it should answer all your questions (though I must say that it is little bit complicated)...
also there is a very nice tutorial here: http://www.newlc.com/article.php3?id_article=136