Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User lepo's Avatar
    Join Date
    Mar 2003
    Posts
    6
    Hello,

    (Series 60)

    I have a problem concerning a list box with icons in the first column. It's easy to fill the list with data from a resource file, but my application fails when trying to fill it run-time in code, the debugger giving error "User breakpoint called from code at xxx". My code looks as follows:

    CEikColumnListBox* iListBox = new (ELeave) CAknSingleLargeStyleListBox();
    iListBox->ConstructL(this, KAknExListDefaultFlag);

    CDesCArray* textArray = new (ELeave) CDesCArrayFlat(2);
    _LIT(KFirst,"First");
    _LIT(KSecond,"Second");

    textArray->AppendL(KFirst);
    textArray->AppendL(KSecond);

    iListBox->Model()->SetItemTextArray(textArray);
    iListBox->Model()->SetOwnershipType(ELbmOwnsItemArray);

    It fails when trying to draw the control (when DrawNow() in the container is called). Intuitively, it sounds as the text array tries to fit in a graphic column or something. However, I use CAknSingleLargeStyleListBox(), which should know the order of the columns... Or should it?

    Anyone having similar problems? :-)

    Anu

  2. #2
    Regular Contributor ashbhatia's Avatar
    Join Date
    Mar 2003
    Posts
    91
    Hi,

    Instead of using CAknSingleLargeStyleListBox(), use CAknSingleStyleListBox(). your application will work.

    Ashish

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved