Hi!
I have a listbox in multiview application (AppUI contains View, View contains Container and Container has iListbox), but when I set it's scrollbar, it doesn't appear.
However when I use this code into single view (AppUI contains Container), the a scrollbar appear!
Here my code created the container:
Code:
void CMy_ListboxContainer::ConstructL(const TRect& aRect)
{
CreateWindowL();
//list box
iListBox = new( ELeave ) CEikTextListBox();
iListBox->ConstructL(this, 1);
//iListBox->ConstructL(this, EAknListBoxSelectionList);
iListBox->SetContainerWindowL(*this);
iItemArray= InitListBoxData();
iListBox->Model()->SetItemTextArray(iItemArray);
iListBox->Model()->SetOwnershipType(ELbmDoesNotOwnItemArray);
//The model does not own the item array � you must maintain a pointer to it and free it explicitly before your program exits
iListBox->HandleItemAdditionL();
iListBox->SetListBoxObserver(this);
// Creates scrollbar for list box
iListBox->CreateScrollBarFrameL(ETrue);
iListBox->ScrollBarFrame()->SetScrollBarVisibilityL(
CEikScrollBarFrame::EOff, CEikScrollBarFrame::EAuto);
SetRect(aRect);
ActivateL();
}
How can I solve this proplem?
Thanks in advance!