×

Discussion Board

Results 1 to 6 of 6
  1. #1
    Regular Contributor
    Join Date
    Nov 2010
    Posts
    119

    To insert elements in the listbox

    Hi,

    I have created a List. It is showing me the empty List.

    Even if I have written the code for filling the list.

    Please Help me

  2. #2
    Nokia Developer Champion
    Join Date
    Jun 2008
    Location
    Noida,India
    Posts
    3,988

    Re: To insert elements in the listbox

    show what you have written

  3. #3
    Regular Contributor
    Join Date
    Nov 2010
    Posts
    119

    Re: To insert elements in the listbox

    Ok.

    Look this is my code I have written in InitializeControls()

    iList1=new (ELeave) CAknSingleLargeStyleListBox;
    iList1->ConstructL(this,EAknListBoxSelectionList);
    iList1->SetContainerWindowL(*this);

    CDesCArray *itemList = new (ELeave) CDesCArrayFlat(2);

    itemList->AppendL(_L("\tFirst item\t\t"));
    itemList->AppendL(_L("\tSecond item\t\t"));
    itemList->AppendL(_L("\tThird item\t\t"));

    //set items and ownership
    iList1->Model()->SetItemTextArray(itemList);
    iList1->Model()->SetOwnershipType(ELbmOwnsItemArray);

    iList1->SetCurrentItemIndex(0);
    iList1->SetFocus(ETrue);
    iList1->HandleItemAdditionL();
    iList1->ActivateL();


    ActivateL();

    If u want more code tell me

  4. #4
    Regular Contributor
    Join Date
    Nov 2010
    Posts
    119

    Re: To insert elements in the listbox

    hello have u tested my code. please response

  5. #5
    Regular Contributor
    Join Date
    Nov 2010
    Posts
    70

    Re: To insert elements in the listbox


  6. #6
    Regular Contributor
    Join Date
    Nov 2010
    Posts
    119

    Re: To insert elements in the listbox

    Thanks for suggetion but i got the answer properly.

Similar Threads

  1. To insert elements in the listbox
    By PM5249 in forum Symbian Tools & SDKs
    Replies: 2
    Last Post: 2010-11-22, 12:34
  2. ListBox - size of elements
    By Jeepy in forum Symbian
    Replies: 0
    Last Post: 2009-08-05, 09:26
  3. how to add Icon for ListBox elements???
    By rohanwaugh in forum Symbian User Interface
    Replies: 15
    Last Post: 2008-11-18, 11:05
  4. how can I insert a special character to a Listbox
    By mangoEddie in forum Symbian User Interface
    Replies: 1
    Last Post: 2004-07-07, 04:13
  5. Couldnt scroll down to all the elements in a ListBox
    By rmuralidharan in forum Symbian
    Replies: 1
    Last Post: 2003-06-11, 04:51

Posting Permissions

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