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


Thank you for visiting the BlackBerry Support Community Forums.

BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)

BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.

"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."

- Kevin Michaluk, Founder, CrackBerry.com

Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.


Reply
Developer
Posts: 415
Registered: ‎07-28-2010
My Device: 8000
My Carrier: hi

editfield with non editable action and multi line

Hello,

         i want edit field with non editable. its look like lable. i juse folling code but not work.

any one tel me where i was wrong??

 

EditField edges=new EditField(EditField.NO_NEWLINE | EditField.NO_EDIT_MODE_INPUT);

        please help me frnd.

 

       i also use my one edit fild when i enter data in edit fild it wil go multilne. how we give fiix tex size for

editfild. i use following code for editfield.

 

EditField edName=new EditField(EditField.NO_NEWLINE |EditField.FILTER_EMAIL)
    {
        //to add rectangle(border) around edit field    
        protected void paint(Graphics g)
        {
            g.clear();
            g.drawRect(0, 0, (int)(Display.getWidth()/1.5),edName.getHeight()/*(int)(Display.getHeight()/9)*/);    
            super.paint(g);            
        }    
    };

 

but when i enter more than one line it goes to second line. pls tel me where i wrong.

                    thanks,

                        ajay

 

 

 

Developer
Posts: 516
Registered: ‎07-23-2010
My Device: 9900

Re: editfield with non editable action and multi line

First of all you can edit text in a read only edit field unless you are programing it.

Why don't you use a LabelField if you don't want the user to edit it and also the LabelField is one line.

Developer
Posts: 282
Registered: ‎02-25-2010
My Device: curve,bold,storm
My Carrier: Verizon,AT&T

Re: editfield with non editable action and multi line

do u want your contents to scroll inside the edit field when data goes beyond 1 line:

 

for that put your editfield inside a horizontalFieldmanager enabled with Horizontal scroll

u must create the editfield with property : no new line

Developer
Posts: 91
Registered: ‎06-21-2011
My Device: Blackberry Torch 9800
My Carrier: developer

Re: editfield with non editable action and multi line

if you want your EditField not be editable just override  it's keyChar method :

 

protected boolean keyChar(char key, int status, int time) {
        return true;
    //    return super.keyChar(key, status, time);
}

Regards,
Arsen
Highlighted
Visitor
Posts: 1
Registered: ‎07-07-2011
My Device: 9800
My Carrier: student

Re: editfield with non editable action and multi line

the property editfield.No_NewLine will work fine for single line but if u want to fix the text in single line u must generate an event for fixed number of charcters will enter into the editfield.