Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User Marw_Work's Avatar
    Join Date
    Mar 2003
    Posts
    40
    Hi! I'm using CAknSingleHeadingStyleListBox in Series60 0.9 SDK. How can I make 2 column into it? I have tried:

    listItem.Copy(_L("Headr\t1Col\t2Col"));

    and tried to set column widths like:

    CColumnListBoxData* columnData = iListBox->ItemDrawer()->ColumnData();
    columnData->SetColumnWidthPixelL( 0, 30 ); //1st col
    columnData->SetColumnWidthPixelL( 1, 68 ); //2nd col

    , but my iListBox is type CEikTextListBox and ItemDrawer is not member of it.

  2. #2
    Registered User Holler's Avatar
    Join Date
    Mar 2003
    Location
    Braunschweig
    Posts
    46
    I have implemented 3 columns in Series60 with the following code:

    iListBox = new( ELeave ) CAknColumnListBox ();
    iListBox->SetContainerWindowL( *this );
    iListBox->ConstructL( this );
    iListBox->SetRect(aRect.Size()); // wichtig
    iListBox->CreateScrollBarFrameL(ETrue);
    iListBox->ScrollBarFrame()->SetScrollBarVisibilityL(
    CEikScrollBarFrame::EOff, // NO horizontal
    CEikScrollBarFrame::EOn); // YES vertical

    CColumnListBoxItemDrawer* drw = iListBox->ItemDrawer();
    drw->ColumnData()->SetColumnWidthPixelL(0,91);
    drw->ColumnData()->SetColumnWidthPixelL(1,50);
    drw->ColumnData()->SetColumnWidthPixelL(2,30);

    Populate the columns via \t, e.g.:

    _LIT(KItem1, " Name\tScore\tLev.");
    iArray = new (ELeave) CDesCArrayFlat(10);
    TBuf<24> buf (KItem1);
    iArray->AppendL(buf);

    Regards, Holler

  3. #3
    Registered User Holler's Avatar
    Join Date
    Mar 2003
    Location
    Braunschweig
    Posts
    46
    The linker errors are caused on missing libs.
    Add eikcoctl.lib in your MMP file and eiktxlbm.h
    in your source file. Don't forget to run
    abld makefile vc6 before compiling.

    Wulf

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