Hi, I've got a listbox with 14 lines and a findbox. But the findbox overlays the listbox and is also on the top side of the screen and it has to be on the bottom.
How can I change this?
Click here to download sis file for example
ConstructL
CreateListBoxCode:void CContactenContainer::ConstructL(const TRect& aRect) { CreateWindowL(); SetRect(aRect); CreateListBox(); CreateFindBox(); ActivateL(); }
CreateFindBoxCode:void CContactenContainer::CreateListBox() { iListBox = new (ELeave) CAknSingleStyleListBox(); iListBox->SetContainerWindowL(*this); TResourceReader rr; iCoeEnv->CreateResourceReaderLC(rr, R_DEMO_LISTBOX); iListBox->ConstructFromResourceL(rr); CleanupStack::PopAndDestroy(); iListBox->CreateScrollBarFrameL(ETrue); iListBox->ScrollBarFrame()->SetScrollBarVisibilityL( CEikScrollBarFrame::EOn, CEikScrollBarFrame::EAuto ); }
OfferKeyEventLCode:void CContactenContainer::CreateFindBox() { CAknFilteredTextListBoxModel* model = static_cast<CAknFilteredTextListBoxModel*>(iListBox->Model()); iFindBox = CAknSearchField::NewL(*this, CAknSearchField::ESearch, NULL, 10); CleanupStack::PushL(iFindBox); iListBox->SetContainerWindowL(*this); model->CreateFilterL(iListBox, iFindBox); CleanupStack::Pop(iFindBox); iFindBox->ActivateL(); iFindBox->DrawNow(); SizeChanged(); }
If you could help me that would be very great.Code:TKeyResponse CContactenContainer::OfferKeyEventL(const TKeyEvent& aKeyEvent, TEventCode aType ) { if(iListBox) { if(iFindBox) { AknFind::HandlePopupFindSizeChanged(this, iListBox, iFindBox); iListBox->SetCurrentItemIndex(0); iListBox->HandleItemAdditionL(); SizeChanged(); DrawNow(); } return iListBox->OfferKeyEventL( aKeyEvent, aType ); } else return EKeyWasNotConsumed; }

Reply With Quote

