×

Discussion Board

Results 1 to 2 of 2

Thread: OfferKeyEventL

Hybrid View

  1. #1
    Registered User
    Join Date
    Mar 2003
    Location
    Vancouver, Canada
    Posts
    25

    OfferKeyEventL

    What is the way to handle the OfferKeyEventL() for several CEikEdwin's in the view?

    Example:
    ========

    //
    // Example for single CEikEdwin
    //
    TKeyResponse CKgAppView2::OfferKeyEventL(const TKeyEvent& aKeyEvent,TEventCode aType)
    {
    return iEdit0->OfferKeyEventL(aKeyEvent, aType);
    }

    What would be the solution for several CEikEdwin's (eg. iEdit1, iEdit2, iEdit3, etc)? Where to look for sample code?

  2. #2
    Registered User
    Join Date
    Mar 2003
    Posts
    8

    RE: OfferKeyEventL

    You should check which field is focused

    TKeyResponse CKgAppView2::OfferKeyEventL(const TKeyEvent& aKeyEvent,TEventCode aType)
    {
    TKeyResponse response = EKeyWasNotConsumed;
    if (iEdit0->IsFocused())
    response = iEdit0->OfferKeyEventL(aKeyEvent, aType);
    else if (iEdit1->IsFocused())
    response = iEdit1->OfferKeyEventL(aKeyEvent, aType);
    //...etc.
    return response;
    }

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×