×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Regular Contributor
    Join Date
    Apr 2003
    Posts
    52

    Help for creating check box

    I am trying wit the following code for creating a check box But the program Crash can anybody Help

    iListBox=new( ELeave ) CAknSingleGraphicStyleListBox();


    iListBox->ConstructL( this, EAknListBoxSelectionList |EAknListBoxMultiselectionList );
    iListBox->SetContainerWindowL( *this );


    iListBox->CreateScrollBarFrameL(ETrue);
    iListBox->ScrollBarFrame()->SetScrollBarVisibilityL(CEikScrollBarFrame::EOff, CEikScrollBarFrame::EAuto);


    SetGraphicIconL(iListBox);


    MDesCArray* itemList = iListBox->Model()->ItemTextArray();
    CDesCArray* itemArray = (CDesCArray*) itemList;
    itemArray->AppendL(_L("\tTest"));
    itemArray->AppendL(_L("\tIlona\tThis is an SMS, XML..."));

    iListBox->HandleItemAdditionL();


    iListBox->SetRect(Rect());

    iAvkonAppUi->AddToStackL(iListBox);



    SetRect(aRect);
    ActivateL();


    With Thanks
    Meenu

  2. #2
    Regular Contributor
    Join Date
    Apr 2003
    Posts
    52
    I got the answare myself
    U have to use '1' before '\t'
    i.e. itemArray->AppendL(_L("\tTest")); become
    itemArray->AppendL(_L("1 \tTest"));


    Meenu

Posting Permissions

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