×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Nov 2006
    Posts
    36

    Navigation in Dialog with Tab key

    Hi,

    I have a dialog which contains 2 CEikRichTextEditors. Is there a trivial way (a itemsflag or so) to convert the tab key to a navigation key? I suppose the normal way would be to overwrite the dialog's OfferKeyEventL(). But in this case I would have to handle every key event, right? Or is there a way only to pick the key I want to handle and let the dialog do the rest of the "normal" key handling?

    Thank you in advance

    pgivy

  2. #2
    Super Contributor
    Join Date
    Jun 2004
    Location
    SymbianLand
    Posts
    763

    Re: Navigation in Dialog with Tab key

    Quote Originally Posted by pgivy
    Hi,

    I have a dialog which contains 2 CEikRichTextEditors. Is there a trivial way (a itemsflag or so) to convert the tab key to a navigation key? I suppose the normal way would be to overwrite the dialog's OfferKeyEventL(). But in this case I would have to handle every key event, right? Or is there a way only to pick the key I want to handle and let the dialog do the rest of the "normal" key handling?

    Thank you in advance

    pgivy
    Two things:
    1. How would you get the TAB key on the phone???
    2. I you want to handle any key event just handle that key event and then pass it on the dialog's OfferKeyEventL,so the code would look something like this
    Code:
    TKeyResponse CXXXContainer::OfferKeyEventL(const TKeyEvent& aKeyEvent,
                            TEventCode aType)
    {
        if ( aType != EEventKey ){
            return EKeyWasNotConsumed;
        }
    
        switch ( aKeyEvent.iCode )
        {
            // Up & Down arrow key's event transfer to list box
            // you can add your key codes as well
            case EKeyUpArrow:
            case EKeyDownArrow:
                   //do something here
                   // but it would also be a good idea to pass it on this key to the 
                   // dlg  as well
                    TKeyResponse aresp = dlg->OfferKeyEventL( aKeyEvent, aType );
                    DrawNow();
                    return aresp;
                break;
            default:
                    TKeyResponse aresp = dlg->OfferKeyEventL( aKeyEvent, aType );
                    DrawNow();
                    return aresp;
                break;
         }
       return EKeyWasNotConsumed;
    }
    Hope this helps.
    --Mayur.

  3. #3
    Registered User
    Join Date
    Nov 2006
    Posts
    36

    Re: Navigation in Dialog with Tab key

    Hi Mayur,

    thank you for your reply.

    1. How would you get the TAB key on the phone???
    I'm developing for a S80 phone which has a full keyboard including the TAB key.

    2. I you want to handle any key event just handle that key event and then pass it on the dialog's OfferKeyEventL,so the code would look something like this
    The dialog is created from resource file. What I don't understad is where to take a container for this dialog from. Do I have to create a window and set this new window as the container of the dialog? Sorry as you can read my understanding of symbian GUI logic is not very deep...

    On the other hand I have to tell the CEikRichTextEditor controls not to eat the TAB Key. How do I this?

    Greeting

    pgivy
    Last edited by pgivy; 2007-02-01 at 09:39.

Similar Threads

  1. Replies: 0
    Last Post: 2006-11-22, 06:40
  2. Replies: 0
    Last Post: 2006-11-21, 17:45
  3. Replies: 0
    Last Post: 2006-07-03, 05:35
  4. Key events while a dialog is open
    By ShabbirPatel in forum Symbian User Interface
    Replies: 0
    Last Post: 2006-05-23, 16:35
  5. 7650 SetDefaultViewL() doesn't set right navigation tab
    By 4sure in forum Symbian Tools & SDKs
    Replies: 2
    Last Post: 2002-09-25, 09:16

Posting Permissions

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