Discussion Board
-
SettingListBox OfferKeyEventL suddenly doesn't work with HandleListBoxEventL?
2003-08-23, 08:53
#1
Regular Contributor
Hi ppl.
I ccreated a settinglistbox. Whenever i click on my setting item it will change between On and Off.
But after i added HandleListBoxEventL(), it won't change anymore even if i click on it, it will always be "Off" (or depending on its initial value).
This is my setting list box OfferKeyEventL():
-----------------------------------------------------------------------------------------------
TKeyResponse CF2FSettingListListBox::OfferKeyEventL(
const TKeyEvent& aKeyEvent,
TEventCode aType )
{
if ( aType != EEventKey ) // Is not key event?
{
return EKeyWasNotConsumed;
}
switch ( aKeyEvent.iCode ) // The code of key event is...
{
case EKeySpace: // Space key.
case EKeyRightArrow:
break;
case EKeyLeftArrow:
break;
default:
CAknSettingItemList::OfferKeyEventL(aKeyEvent, aType);
User::InfoPrint(_L("OfferKeyEventL()"));
break;
}
return EKeyWasConsumed;
}
-----------------------------------------------------------------------------------------------
When i added HandleListBoxEventL() it stopped responding to my key presses. Doesn't switch between On and Off anymore:
-----------------------------------------------------------------------------------------------
void CF2FSettingListListBox::HandleListBoxEventL(CEikListBox* aListBox, TListBoxEvent
aEventType)
{
//My HandleListBoxEventL code
}
-----------------------------------------------------------------------------------------------
Any idea anyone???
- aDvo -
-
kind of solved
2003-08-23, 08:59
#2
Regular Contributor
hmm okay
I just added
CAknSettingItemList::HandleListBoxEventL(aListBox, aEventType);
to
HandleListBoxEventL()
and it started working again.
One thing i don't really understand is why adding HandleListBoxEventL() function caused:
CAknSettingItemList::OfferKeyEventL(aKeyEvent, aType);
not to work 'properly' anymore.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules