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

NORTEL MERIDIAN NT6D66DA RLSE 02 CALL PROCESSOR CARD
$30.0
NORTEL MERIDIAN NT6D66DA RLSE 02 CALL PROCESSOR CARD pictureNORTEL NT9D19CA_Rlse 03 68040/48MB Call Processor Card
$55.0
NORTEL NT9D19CA_Rlse 03 68040/48MB Call Processor Card picture2016 New Sealed Allen Bradley 1756-L71 Ser B ControlLogix 5571 Processor CPU PLC
$2349.99
2016 New Sealed Allen Bradley 1756-L71 Ser B ControlLogix 5571 Processor CPU PLC pictureLumenis "Varia" Cpu Board 0641-500-01
$75.0
Lumenis ITW Camtex LQFP Used 14X14X1.4 Black CPU Tray
$13.0
ITW Camtex LQFP Used 14X14X1.4 Black CPU Tray picture






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