BlackBerry Forums Support Community               

Closed Thread
 
LinkBack Thread Tools
Old 09-12-2007, 05:56 PM   #1 (permalink)
New Member
 
Join Date: Aug 2007
Model: 8300
PIN: N/A
Carrier: velizon
Posts: 4
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default creating option to open RichTextField

Please Login to Remove!

Hello,

I am creating checkbox to open RichText, and somehow my application hang up when I checked the checkbox.

Would someone please give me an advice what is wrong in my code?

private CheckboxField text = new CheckboxField("open text", false);
text.setChangeListener(this);
screen.add(text);
screen.add(new SeparatorField());

public void fieldChanged(Field field, int context)
{
if(field == text)
{
LabelField title = new LabelField("Sample", LabelField.ELLIPSIS | LabelField.USE_ALL_WIDTH);
setTitle(title);
add(new RichTextField(""));
}
}

Thanks for in advance
Offline  
Old 09-13-2007, 01:02 AM   #2 (permalink)
Thumbs Must Hurt
 
Join Date: Jun 2007
Location: Bangladesh
Model: 8800
PIN: N/A
Carrier: EDGE
Posts: 93
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi tacomaWA,

I've tested your code but it didn't make any harm for me. I'm not sure, why your application hangs up when you checked the checkbox.

But here i've found, you are adding everytime a blank RichTextField during check or uncheck the checkbox. And you have implemented FieldChangeListener in your same class but you are not adding any RichTextField by using your MainScreen instance ("screen.") like you before does. Make sure that you are doing the right way that you exactly want.

Cheers,
ARIF

Last edited by arifzaman : 09-13-2007 at 01:03 AM.
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

DP5Z1MM8NKH3-12M Dense Pac 8 Megabit FLASH EEPROM 48Pin Gullwing Leaded SLCC NOS
$850.0
DP5Z1MM8NKH3-12M Dense Pac 8 Megabit FLASH EEPROM 48Pin Gullwing Leaded SLCC NOS picture5PCS AT24C128 SOP8 24C128 IC EEPROM 128KBIT 1MHZ
$1.51
5PCS AT24C128 SOP8 24C128 IC EEPROM 128KBIT 1MHZ pictureXLS28C16AJ-200 EXCEL XLS28C16AJ EEPROM SMT NEW LAST ONES
$7.95
XLS28C16AJ-200 EXCEL XLS28C16AJ EEPROM SMT NEW LAST ONES picture1736DSC XILINX SERIAL EEPROM 8-Pin 8-SOIC IC SMT NEW LAST ONE
$1.95
1736DSC XILINX SERIAL EEPROM 8-Pin 8-SOIC IC SMT NEW LAST ONE pictureAPPRX 400PC SMD 93C46 1K BIT SERIAL EEPROM LOT 128X8 - SOIC8
$9.95
APPRX 400PC SMD 93C46 1K BIT SERIAL EEPROM LOT 128X8 - SOIC8 picture






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