BlackBerry Forums Support Community
              

Closed Thread
 
LinkBack Thread Tools
Old 07-16-2008, 12:58 PM   #1 (permalink)
Thumbs Must Hurt
 
Join Date: Apr 2007
Location: Cincinnati, OH
Model: 8700c
PIN: N/A
Carrier: Cingular
Posts: 87
Post Thanks: 0
Thanked 0 Times in 0 Posts
Unhappy setEditable() method doesn't work with EditFields?

Please Login to Remove!

RE: setEditable() method

JDE 4.1

net.rim.device.api.ui.component.EditField
net.rim.device.api.ui.Field


Hi Folks,
Is it just me, or does the setEditable() method do absolutely nothing when used with an EditField object?

Code:
class MyClass extends FullScreen
{  EditField myEditField = new EditField();
   MyClass()
   {  myEditField.setEditable( false); 
          //Seems to do nothing.  I.e. I can still type text into myEditField
      add( myEditField);
   }
}
Am I missing something?

Of course an easy work-around would be to:
1) Delete myEditField
2) Set myEditField to a new EditField( Field.READONLY), or something like that.
3) Insert myEditField back onto the screen.

But, shouldn't the setEditable() method work if it is available to the class?

Much thanks if anyone can give me a pointer or point me to some helpful documentation.
Offline  
Old 07-16-2008, 01:15 PM   #2 (permalink)
BlackBerry Extraordinaire
 
Join Date: Mar 2008
Location: Austin, TX
Model: 9700
PIN: N/A
Carrier: T-Mobile
Posts: 1,644
Post Thanks: 0
Thanked 34 Times in 33 Posts
Default

Try to create your field as a BasicEditField instead - this one is known to work (in my experience).
Offline  
Old 07-16-2008, 03:16 PM   #3 (permalink)
Thumbs Must Hurt
 
Join Date: Apr 2007
Location: Cincinnati, OH
Model: 8700c
PIN: N/A
Carrier: Cingular
Posts: 87
Post Thanks: 0
Thanked 0 Times in 0 Posts
Smile Thanks

Thanks Doug,

You're right; setEditable() does work with BasicEditField. In fact it also works with EditField.
I had a mistake elsewhere in my code
You got me going in the right direction to find my bug.

Thanks again!
Offline  
Closed Thread


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Lot of 4 HP 48GX Calculators with 128K RAM
$999.0
Lot of 4 HP 48GX Calculators with 128K RAM pictureHP 48GX Calculators 128K RAM (Lot of 4)
$999.0
HP 48GX Calculators 128K RAM (Lot of 4) picturePar Everserv 6000 Touchscreen POS Terminal 2.16GHz CPU 3GB RAM 80GB HDD M7125-01
$349.99
Par Everserv 6000 Touchscreen POS Terminal 2.16GHz CPU 3GB RAM 80GB HDD M7125-01 picture1 PC ROCKY-4786EV-RS-R40 VER: 4.0 Board With CPU Fan Ram Used
$178.99
1 PC ROCKY-4786EV-RS-R40 VER: 4.0 Board With CPU Fan Ram Used pictureUsed Motherboard 1G RAM+8G ROM for CUBOT ONE JFR385424 For Parts
$54.99
Used Motherboard  1G RAM+8G ROM for CUBOT ONE JFR385424 For Parts picture






Copyright 2004-2016 BlackBerryForums.com.
The names RIM and BlackBerry are registered Trademarks of BlackBerry Inc.