Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
Regular Contributor
Posts: 75
Registered: ‎07-22-2010
My Device: Not Specified
My Carrier: Trainee

how can I delete a edit field when backspace is clicked.

I want to delete a editField  when I click backspce.

How can I do that that.?

Please help me sorting out this problem.

Thanks

Developer
Posts: 468
Registered: ‎08-07-2009
My Device: Curve, Bold, Storm
My Carrier: Blackberry Developer

Re: how can I delete a edit field when backspace is clicked.

HI,

 

Override keylistener methods

 

    public boolean keyChar(char key, int status, int time)
    {
        boolean retval = false;
        if(key == Characters.ESCAPE)
        {
           //your code to delete editfield from your manager

          retval = true;
        }
        else
        {
            retval = super.keyChar(key, status, time);
        }

        return retval;
    }

----------------------------------------------------------
feel free to press the kudos button on the left side to thank the user that helped you.
please mark posts as solved if you found a solution.