×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Regular Contributor
    Join Date
    May 2008
    Posts
    139

    CEikEdwin and Arrow/Delete Keys

    I created CEikEdwin is a view class to get user input. It displays the control and takes text input. However, it does not access left/right Arrow or delete keys to edit the entered text.

    Below is code. Pls help

    iEdwin = new ( ELeave ) CMyEdwin();
    iEdwin->SetContainerWindowL( *this );

    TInt edwinFlags = CEikEdwin::ENoAutoSelection;
    edwinFlags |= CEikEdwin::EJustAutoCurEnd;
    edwinFlags |= CEikEdwin::ENoLineOrParaBreaks;
    edwinFlags |= CEikEdwin::EAvkonEditor;

    //edwinFlags |= CEikEdwin::EOnlyASCIIChars ;

    iEdwin->ConstructL( edwinFlags );
    iEdwin->SetTextLimit (64);

    iEdwin->SetRect(e);
    iEdwin->MakeVisible(ETrue);
    iEdwin->ActivateL();

  2. #2
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,734

    Re: CEikEdwin and Arrow/Delete Keys

    Try adding SetFocus(ETrue).

  3. #3
    Regular Contributor
    Join Date
    May 2008
    Posts
    139

    Re: CEikEdwin and Arrow/Delete Keys

    Quote Originally Posted by wizard_hu_ View Post
    Try adding SetFocus(ETrue).
    Hi Wiz, setfocus is true. As I mentioned, it accepts normal ascii characters. The problem is when I derived class from CEikEdwin and use it, it is not accepting arrow/delete keys. However, if I use CEikEdwin, it works fine. Below is derived class.

    class CMyEdwin : public CEikEdwin {

    public:
    void Draw(const TRect& aRect) const {
    CWindowGc& gc = SystemGc();
    gc.SetPenStyle(CGraphicsContext::ENullPen);
    gc.SetBrushColor(KRgbBlack);
    gc.SetBrushStyle(CGraphicsContext::ESolidBrush);
    gc.DrawRect(aRect);

    CEikEdwin::Draw(aRect);

    };
    };

Posting Permissions

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