×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Regular Contributor
    Join Date
    Jun 2003
    Posts
    318

    SettingListBox OfferKeyEventL suddenly doesn't work with HandleListBoxEventL?

    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 -

  2. #2
    Regular Contributor
    Join Date
    Jun 2003
    Posts
    318

    kind of solved

    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
  •  
×