Discussion Board

Results 1 to 2 of 2

Thread: OfferKeyEventL

  1. #1
    Registered User cvz's Avatar
    Join Date
    Mar 2003
    Location
    Vancouver, Canada
    Posts
    25
    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 jmatulja's Avatar
    Join Date
    Mar 2003
    Posts
    8
    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
  •  
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved