×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Mar 2003
    Posts
    6

    Dynamic data in column lists with icons

    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
    Nokia Developer Expert
    Join Date
    Mar 2003
    Posts
    91

    RE: Dynamic data in column lists with icons

    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
  •