×

Discussion Board

Results 1 to 3 of 3

Thread: about form

  1. #1
    Regular Contributor
    Join Date
    Jul 2006
    Posts
    81

    about form

    Hi everybody,

    I find in this forum a way to simulate a find box's close...such as a way to reproduce the press of keys. Here the code:
    -------------------------------------------------------------------
    if (iFindBox)
    {
    // Empty FindBox Search Text
    _LIT(KBlank, "");
    iFindBox->SetSearchTextL(KBlank);

    // Press Backspace on Empty FindBox to Close it
    TBool refresh = EFalse;
    TKeyEvent key;
    key.iCode = EKeyBackspace;
    key.iScanCode = EStdKeyBackspace;
    key.iRepeats = 0;
    key.iModifiers = 0;
    AknFind::HandleFindOfferKeyEventL(key, EEventKey, this, iListbox, iFindBox, ETrue, refresh);

    // Redraw Screen
    if (refresh) {
    SizeChanged();
    DrawDeferred();
    }
    }
    ------------------------------------------------------

    I need something similar. Can anyone help me???

    BestRegards

    Let

  2. #2
    Regular Contributor
    Join Date
    Jul 2006
    Posts
    81

    Re: about form

    I wrote...

    void CMyForm::CloseFormL()
    {

    // Press Backspace on form to Close it
    TKeyEvent key;
    key.iCode = EKeyBackspace;
    key.iScanCode = EStdKeyBackspace;
    key.iRepeats = 0;
    key.iModifiers = 0;
    CAknForm::OfferKeyEventL(key, EEventKey);
    }


    but nothing append when I call this function.

    Can anyone help me???!?!?!?

    Please!!!

    Let

  3. #3
    Regular Contributor
    Join Date
    Jul 2006
    Posts
    81

    Re: about form

    OK everybody, I solved with the right key:

    void CMyForm::CloseFormL()
    {
    // Press Escape on form to Close it
    TKeyEvent key;
    key.iCode = EKeyEscape;
    key.iScanCode = EStdKeyEscape;
    key.iRepeats = 0;
    key.iModifiers = 0;
    CAknForm::OfferKeyEventL(key, EEventKey);
    }

    Bye bye

    Let

Similar Threads

  1. second form not getting key events
    By krsunil in forum Symbian User Interface
    Replies: 3
    Last Post: 2008-12-10, 10:29
  2. how to create a Form like Lockcode form?
    By sarvestan in forum Mobile Java General
    Replies: 2
    Last Post: 2006-08-29, 20:15
  3. How to pass variable between form
    By imagina23 in forum Mobile Java General
    Replies: 1
    Last Post: 2006-06-15, 18:29
  4. Form not displaying
    By Shabs in forum Symbian User Interface
    Replies: 0
    Last Post: 2003-07-09, 16:38

Posting Permissions

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