Hi,
I want to set events on my list box items.Suppose, I have a list of groups as my list box items,and I want to view the group members when I press OK button.How do I it?
I think you could do that very easily in your container that owns your listbox, you just catch the command in your command handler function and tell your container to show the item.
Then in your containes showitem function you just take a pointer to your listboxes item array and get the item wanted to be shown and just show it anyway you want.
Thanks Yucca
Ur suggestion is going a bit too high above my head.Can u pls write a more detailed /simpler way so that I understand as I am new to Series 60 programming.Maybe some sample lines of code would help
------------------------------------------------------------------
Well anyway here's how the SDK examples do it:
I may have added stuff here and there, anyone correct me if i'm having redundant code:
switch(aListBox->CurrentItemIndex())
{
case 0:
//Display Group 1?
break;
case 1:
//Display Group 2?
break;
default:
User::InfoPrint(_L("Error"));
break;
}
}
Somewhere inside u'r Container's OfferKeyEventL function, preferably at the end...
//*********Notice that if list->offerkeyevent is not used, HandleListBoxEvent for that
//*********particular list also does not run, so we don't get events from that list
if ( iFormattedListBox )
{
return iFormattedListBox->OfferKeyEventL(aKeyEvent, aType);
}