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
Developer
Posts: 415
Registered: ‎07-28-2010
My Device: 8000
My Carrier: hi
Accepted Solution

editable field

[ Edited ]

hello friends,

                       i am create 15 non editable filed,  code for that is bellow.

             for(int i=0;i<15;i++)
             {
                edf[i]=new EditField(EditField.NO_NEWLINE  |EditField.READONLY);
             }

  when i press one lable which name is edit profile than profile information is edittable.

i use folling code for that.

 

           for(int i=0;i<15;i++)
        {
          edf[i].seteditable(true);
        }

 

But still that profile is not editable. pls tel me where i wrong??

 

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

Re: editable field

hi,

 

in the 2nd loop you are again recreating the efitfields.

 

 

you need to use the object and make it editable

 

(int i=0;i<15;i++)
        {
          edf[i].seteditable(true);
        }

----------------------------------------------------------
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.
Developer
Posts: 19,636
Registered: ‎07-14-2008
My Device: Not Specified

Re: editable field

I think you will find that the READ_ONLY style overrides the editable flag.  So create them as updateable and

setEditable(false)

until you want the user to update them.

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

Re: editable field

[ Edited ]

Hello friends,

                      I am creating 15non editable edit field as bellow.

        for(into I=0;I<15;I++)
	{
	    edf[I]=new EditField(EditField.NO_NEWLINE);
	    setEditable(false);
	}

when i use above code my edit field is still editable, i am using setEditable(false) but it is not work.

 

 

when i do           
                edf[i]=new EditField(EditField.NO_NEWLINE | EditField.READONLY);

because of EditField.READONLY my edit field is non editable. But when I want to do editable that field that not work. They still noneditable because of readonly.


when i want to do that edit field editable i use following code.

 

            for(int i=0;i<15;i++)
	       {
       		 edf[i].setEditable(true);
	       }

 

 

but still when i call above my edit field is readonly.

 

menas when i use  EditField.READONLY than  edit field is read only.

when i am not use readonly than it is not possbile to make noneditble field.

what shoud i do?? tel me proper function??

                 where is wrong??

please reply me friends,

       Thanks,

         ajay

 

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

Re: editable field

I slove my problem.Smiley Happy

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

Re: editable field

hi,

 

Then please mark this thread SOLVED!!!

----------------------------------------------------------
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.
Developer
Posts: 185
Registered: ‎09-02-2010
My Device: Not Specified

Re: editable field

Hi patilajayr,

 

 

 How can u solved ur problem,What modifications u did in ur program  to get the output..

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

Re: editable field

Hello friends,

              i solve my problem.

 whenever we need edit field like redonly format than you just create edit field like that.

 

    EditField    edf=new EditField(EditField.NO_NEWLINE);
                edf.setEditable(false);

 

 

 

When you need that edit field editable for make changes than just add line where you need that edit field editable.

 

      edf.setEditable(true);

 

Than edf edit field is editable now.

thanks,

ajay.