Re : Dynamic ListBox....

Login to reply to this topic.
Mon, 2005-08-15 11:33
Joined: 2005-08-01
Forum posts: 25
 hi....
           i'm new to this symbian environment...after a long struggle i got this...

u need to include  < aknlists.h > ....


code 4 dynamic listbox :


    CAknSingleStyleListBox* iListBox;
       
    CDesCArrayFlat* iListBoxRows;
      
    iListBox = new ( ELeave ) CAknSingleStyleListBox;
    iListBox->ConstructL( this, 0 );
    iListBox->SetContainerWindowL( *this );
    iListBox->SetRect( aRect.Size() );

    iListBoxRows = new ( ELeave ) CDesCArrayFlat( KGranularityOfArray );
    iListBox->Model()->SetItemTextArray( iListBoxRows );
    iListBox->Model()->SetOwnershipType( ELbmDoesNotOwnItemArray );
    iListBox->ActivateL();
    iListBox->CreateScrollBarFrameL( ETrue );
    iListBox->ScrollBarFrame()
          ->SetScrollBarVisibilityL( CEikScrollBarFrame::EOff, CEikScrollBarFrame::EAuto );

    iListBox->DrawNow();

    ActivateL();
    MakeVisible(ETrue);

Sun, 2005-08-21 00:34
Joined: 2004-06-06
Forum posts: 205
Re: Re : Dynamic ListBox....
and?

Best regards,
Michal Laskowski

  • Login to reply to this topic.