I create an Instance of CCknVerticalTextAndIconListBox and populate it with text as given in the sample with the SDK.
I have populated the modeliconarray with null as in the sample to turn the icons off. When I populate just on item it shows correctly. When I populate more than one items I get an error on iIconList->DrawNow().
Any reason why this error?
Also in the sample it says to set the column gap use View()->SetColumnGap(2). But the CListBoxView does not have a method SetColumnGap.
//Create scroll bar frame.
iIconList->CreateScrollBarFrameL(ETrue);
//Set the HORIZONTAL scroll bar to be ON, and the VERTICAL one to be off.
iIconList->ScrollBarFrame()->SetScrollBarVisibilityL(CEikScrollBarFrame::EOn, CEikScrollBarFrame::EOff);
//Set the border type. This defaults to ENone.
iIconList->SetBorder(TGulBorder::EThickDeepRaisedWithOutline);
//Set the gap between items to 1.
iIconList->View()->ItemDrawer()->SetVerticalInterItemGap(10);
iIconList->SetItemHeightL(50);
iIconList->ActivateL();
}
Brijesh
Posted by brijesh Gajaria, brijesh@itfinity.com
on January 04, 2002 at 09:21
To set the column gap you will need to cast the view returned by your listbox to CSnakingListBoxViewWithGapsAndBrush and then call SetColumnGap, see header file CKNLBV.H