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





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