×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Regular Contributor
    Join Date
    Mar 2003
    Posts
    108

    listbox not showing??

    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();

  2. #2
    Regular Contributor
    Join Date
    Mar 2003
    Posts
    371

    RE: listbox not showing??

    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
  •  
×