×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Oct 2004
    Location
    Hyderabad
    Posts
    38

    problem with offerkeyeventL in dialog

    hi every one,
    i have a class CVideoList which is derived from CAknDialog. control is not comming into OfferkeyeventL when i pressed keys on the mobile. my code is like that. plz suggest me.

    CVideoListDialog::~CVideoListDialog()
    {

    }

    void CVideoListDialog::PreLayoutDynInitL()
    {

    iLink1 = (CEikLabel*) Control(ELink1);
    iLink1->SetFont(iEikonEnv->AnnotationFont());
    iLink1->SetExtent(TPoint(10,20),TSize(20,20));
    iLink1->SetTextL(_L("Hello"));
    iLink1->SetFocus(ETrue);

    }

    TBool CVideoListDialog::OkToExitL(TInt aButtonId)
    {
    iEikonEnv->InfoMsg(_L("Abc"));
    return 1;
    }

    TKeyResponse CVideoListDialog::OfferKeyEventL(const TKeyEvent& aKeyEvent,TEventCode aType)
    {
    if ( aType != EEventKey )
    {
    return EKeyWasNotConsumed;
    }

    switch ( aKeyEvent.iCode )
    {
    case EKeyUpArrow:
    case EKeyDownArrow:
    return iLink1->OfferKeyEventL(aKeyEvent,aType );
    case EKeyDevice3:
    {
    iEikonEnv->InfoMsg(_L("Hai"));
    break;
    }
    default:
    {
    break;
    }
    }
    }

    hi yucca. plz let me give some suggession regarding this dialog.

  2. #2
    Regular Contributor
    Join Date
    Mar 2003
    Posts
    64
    The method signature looks good to me. What about dialog creation? Simple ExecuteLD(...) or a more complex procedure?

    And what about parent control? Sure you hand events down the chain and right into the CVideoList class?

    I'd say one would need more information to be sure about what's going astray...

    Cheers,
    Stevie

Posting Permissions

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