Discussion Board
-
listbox not showing??
2002-05-16, 10:58
#1
Regular Contributor
hi,
i am trying to create a listbox, but its doesnt show on screen. what could be wrong. and what is the flow of creating a listbox?
thanks,
ash
const TInt KAknExListInitListResourceId = 0;
TInt resourceId( KAknExListInitListResourceId ); // For listbox.
resourceId = R_AKNEXLIST_SINGLE_1;
iListBox = new( ELeave ) CAknSingleStyleListBox();
iListBox->SetContainerWindowL(*this);
TResourceReader reader;
CEikonEnv::Static()->CreateResourceReaderLC( reader, resourceId );
iListBox->ConstructFromResourceL( reader );
CleanupStack::PopAndDestroy(); // resource stuffs.
// Creates scrollbar.
iListBox->CreateScrollBarFrameL( ETrue );
iListBox->ScrollBarFrame()->SetScrollBarVisibilityL( CEikScrollBarFrame::EOn, CEikScrollBarFrame::EAuto );
iListBox->ActivateL();
-
RE: listbox not showing??
2002-05-16, 11:57
#2
Regular Contributor
Hi,
You should also set the control's extent to define the size of the listbox.
iListBox->SetRect(listboxRect);
Regards,
Marko
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules