BlackBerry Forums Support Community               

Closed Thread
 
LinkBack Thread Tools
Old 07-20-2010, 02:44 AM   #1 (permalink)
Knows Where the Search Button Is
 
Join Date: May 2009
Model: 8800
PIN: N/A
Carrier: NOT SURE
Posts: 33
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default Disable Button

Please Login to Remove!

Hi,

- I am using blackberry JDE 4.7.0.41. I have implemented below code to my application, but button clickable action is there. Please give any suggestion.

code:
clkbtn = new ButtonField("Clik",ButtonField.CONSUME_CLICK|Butto nField.FIELD_LEFT);
clkbtn.setChangeListener(listenprevbtn);
clkbtn.setEditable(false);

- How to disable button click action.

Thanks,
Baskar
Offline  
Old 08-10-2010, 07:09 PM   #2 (permalink)
New Member
 
Join Date: Jul 2010
Model: 9700
PIN: N/A
Carrier: Verizon
Posts: 11
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default Can't

Unfortunately (at least to the best of my knowledge) there is no way to "disable" a button built in. setEditable only means you can not edit or modify the button.

The best way I have seen so far to get that functionality is to write your won wrapper button class and add a disable method. That method should disable the clickEvent and probably change the color/look of the button to indicate it is disabled.

An easier but less visually pleasant way is to remove the button when it should be disabled and add it when it should be enabled.
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

Dayton Solenoid Coil 6X544 Volts 208-240 HZ 50-60 Watts 12-17
$12.95
Dayton Solenoid  Coil 6X544  Volts 208-240 HZ 50-60 Watts 12-17 picture4 Pepperl & Fuchs Solenoid Driver Safety Modules # KFD2-SD-Ex1.36, Pt. # 116317
$130.0
4 Pepperl & Fuchs Solenoid Driver Safety Modules # KFD2-SD-Ex1.36, Pt. # 116317 pictureNumatics 082SA431K 081SA400K Solenoid Valve 150psi 15 AMPS 120V 50-60 HZ
$19.5
Numatics 082SA431K 081SA400K Solenoid Valve 150psi 15 AMPS 120V 50-60 HZ picture24V/DC Solenoid Valve
$15.0
24V/DC  Solenoid Valve pictureFESTO VMPA2-M1H-N-PI # 537958 C502 SOLENOID VALVE NEW IN OPEN BOX
$149.99
FESTO VMPA2-M1H-N-PI # 537958 C502 SOLENOID VALVE NEW IN OPEN BOX picture






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