Changing views using ListBoxes
| Mon, 2006-03-27 14:03 | |
|
Hi!
I'm trying to create an application using the view architecture. I've 2 different views, each one being a Listbox implementation. I've set their containers classes to the be the Listbox observers. What I want to do is use a listbox option in the first one to change to the second listbox (the other view) but I can´t get a way to pass the events from the container to the AppUi. Something like this in the first view container: void CviewTestContainer::HandleListBoxEventL(CEikListBox* aListBox, TListBoxEvent aListBoxEvent) { // if the Select Key has been pressed if (aListBoxEvent == MEikListBoxObserver::EEventEnterKeyPressed) { TInt index = aListBox->CurrentItemIndex(); if (index == 0) // Call something in the AppUi that changes the view and creates the listbox according to the option selected if (index == 1) // Create another listbox } } Does anybody have any idea how it can be done? Thanks Sergio |
|






Forum posts: 112
and then you can call eg. MyAppUi->ActivateLocalViewL() without any problem.
Bye,
 Gábor
Bye,
Gábor
Forum posts: 4
I created the CMyAppUi* MyAppUi in the view and then pass it to the container, that way i can define a function to handle the selection of an option in the listbox and create the new listbox based on that data.
thanks for your help
Sérgio