×

Discussion Board

Results 1 to 5 of 5
  1. #1
    Registered User
    Join Date
    Sep 2007
    Posts
    44

    Problem with CEikCloumnListBox

    Hi all
    Actually I want to display some item using this CEikCloumnListBox List box class But I got the blank screen ,means not able to display item , I don't know ,Where is It happening ,can anyone tell me , what could be the problem ,
    Below is my List Box code ,
    ConstructL(CCoeControl *aParent , TRect& aRect)
    {
    CreateWindowL(aParent ); // This will be the Parent CcoeControl for all

    TInt flags( /*CEikListBox::EPopout |*/ CEikListBox::ELeftDownInViewRect );
    iColumnListBox = new( ELeave ) CEikColumnListBox;
    iColumnListBox->SetContainerWindowL(*this);
    iColumnListBox->ConstructL( this, flags );
    // add scrollbars to listbox
    iColumnListBox->CreateScrollBarFrameL(ETrue);
    iColumnListBox->ScrollBarFrame()->SetScrollBarVisibilityL( CEikScrollBarFrame::EOn, CEikScrollBarFrame::EAuto );

    iRect = TRect(aRect);
    iColumnListBox->SetExtent(TPoint(aRect.iTl.iX,aRect.iTl.iY), TSize(aRect.Height(),aRect.Width())); //listbox size
    iColumnListBox->MakeVisible(ETrue);

    CreateNewItemsL();

    SetRect(aRect);
    ActivateL();
    }
    void CreateNewItemsL()
    {
    CTextListBoxModel* aModel= iColumnListBox->Model();
    CDesCArray* itemArray = new (ELeave) CDesCArrayFlat(4);
    CColumnListBoxData* columnData = iColumnListBox->ItemDrawer()->ColumnData();
    total = 12 ;

    HBufC* aItem ;
    for(TInt i = 0; i<total ; i++ )
    {

    aItem = HBufC::NewL(100);
    aItem->Des().AppendNum(i);
    aItem->Des().Append(_L("\titem\t\t"));
    itemArray->AppendL(aItem->Des());
    delete aItem ;
    }
    // set items and ownership
    iColumnListBox->Model()->SetItemTextArray(itemArray);
    iColumnListBox->Model()->SetOwnershipType(ELbmOwnsItemArray);
    iColumnListBox->SetCurrentItemIndex(0);
    iColumnListBox->SetFocus(ETrue);
    iColumnListBox->HandleItemAdditionL();
    iColumnListBox->ActivateL();
    //iColumnListBox->DrawDeferred();
    iColumnListBox->DrawNow();


    }

  2. #2
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,144

    Re: Problem with CEikCloumnListBox

    maybe you could first try with normal S60 listboxes, an example would be available on Wiki: http://wiki.forum.nokia.com/index.ph...simple_listbox

  3. #3
    Registered User
    Join Date
    Nov 2007
    Posts
    444

    Re: Problem with CEikCloumnListBox

    Have you added CountComponentControls() , ComponentControl() methods in your code?

    Regards,
    Kavit.

  4. #4
    Registered User
    Join Date
    Sep 2007
    Posts
    44

    Re: Problem with CEikCloumnListBox

    hi kavit thanks for your fast response
    Yes I have these two function in my application
    these are ........................

    TInt CountComponentControls() const
    {
    if(iColumnListBox)
    return 1;
    else
    return 0;
    }
    CCoeControl* ComponentControl( TInt /*aIndex*/) const
    {
    return iColumnListBox;
    }

    Hi symbianyucca thanks for you reply , I have studied this example and I have used it many time in my application , But here i got this problem with CEikCloumnListBox
    do you have any suggestion about the blank of screen problem
    Last edited by praveen.nitdgp@gmail.com; 2008-07-11 at 10:00.

  5. #5
    Registered User
    Join Date
    Sep 2007
    Posts
    44

    Re: Problem with CEikCloumnListBox

    Hi all
    Thanks for response
    I have sorted out problem
    I searched the forum and got the right thread , if any one face the same problem go the the below link
    http://discussion.forum.nokia.com/fo...kColumnListBox

Similar Threads

  1. Problem with CAknDoubleStyleListBox with a CAknSearchField
    By jjig in forum Symbian User Interface
    Replies: 2
    Last Post: 2009-09-17, 00:58
  2. Problem with eglSwapBuffers and heap corruption
    By greatape in forum Symbian Media (Closed)
    Replies: 2
    Last Post: 2007-05-24, 03:35
  3. netcards - Problem with opening adapter
    By kernj in forum Symbian Tools & SDKs
    Replies: 5
    Last Post: 2007-01-10, 08:56
  4. Problem: S60 SDK for CW in PC with .NET
    By anttij in forum Carbide.c++ IDE and plug-ins (Closed)
    Replies: 1
    Last Post: 2005-02-28, 11:36

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •