how to create a dynamic list box

Login to reply to this topic.
Mon, 2005-08-08 07:12
Joined: 2005-08-01
Forum posts: 25
 
hi....

      can anyone suggest the way to create a dynamic listbox.....

Mon, 2005-08-08 11:00
Joined: 2005-03-06
Forum posts: 183
Re: how to create a dynamic list box
The easiest way, is is clear the list and reipopulate it rather than trying to insert or delete particular items.
Thats the way I do it anyway. Its clean and simple.

Regards,
Isseyp
Wed, 2005-08-10 10:17
Joined: 2005-08-01
Forum posts: 25
adding image in each listbox items ?????


hi.....
         now i have created the dynamic listbox....when switching from the listbox view to another view .......i need the listbox item name in the next view.........

how to add image in each listbox item.....
Thu, 2005-08-11 04:47
Forum Nokia Champion
Joined: 2004-05-26
Forum posts: 732
Re: adding image in each listbox items ?????
Quote from: Neelakantan
when switching from the listbox view to another view .......i need the listbox item name in the next view.........

You can use the following code to set the title of a view:
Code:
void YourClassName::SetAppTitleTextL(const TDesC& aTitleText)
{
CAknTitlePane* titlePane = STATIC_CAST( CAknTitlePane*,
StatusPane()->ControlL( TUid::Uid( EEikStatusPaneUidTitle ) ) );

titlePane->SetTextL( aTitleText );
}

Using the following code you will get the current sellected text from a listbox:

Code:
TInt YourClassName::GetSelectedItemL(TDes& aResult) const
{
CTextListBoxModel* model = iListBox->Model();
if(model->NumberOfItems()==0)
{
return KErrNotFound;
}

aResult.Copy(model->ItemText(iListBox->CurrentItemIndex()));
return KErrNone;
}

Quote from: Neelakantan
how to add image in each listbox item.....

For that you need to finalise which type of listbox you are planing to use.
Check this link for reference: http://www.newlc.com/article.php3?id_article=136

  • Login to reply to this topic.