BlackBerry Forums Support Community
              

Closed Thread
 
Thread Tools
Old 09-12-2007, 05:56 PM   #1
tacomaWA
New Member
 
Join Date: Aug 2007
Model: 8300
PIN: N/A
Carrier: velizon
Posts: 4
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
arifzaman
Thumbs Must Hurt
 
Join Date: Jun 2007
Location: Bangladesh
Model: 8800
PIN: N/A
Carrier: EDGE
Posts: 93
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



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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


MOSFET - IRFZ44N 55V - Transistor  for Arduino Pi  TTL picture

MOSFET - IRFZ44N 55V - Transistor for Arduino Pi TTL

$54.79



840PCS 24 Value TO-92 Transistor Assortment Kit Box NPN PNP 2N2222-S9018 / BC327 picture

840PCS 24 Value TO-92 Transistor Assortment Kit Box NPN PNP 2N2222-S9018 / BC327

$14.99



MOSFET - IRF540N 100V 33A - Transistor for Arduino Pi TT picture

MOSFET - IRF540N 100V 33A - Transistor for Arduino Pi TT

$49.72



TO-92 Assortment NPN PNP DIY kit 15 value 600pcs Transistor  picture

TO-92 Assortment NPN PNP DIY kit 15 value 600pcs Transistor

$14.40



US Stock 4pcs 2N3055 NPN AF Amp Audio Power Transistor 15A/60V picture

US Stock 4pcs 2N3055 NPN AF Amp Audio Power Transistor 15A/60V

$11.66



Portable 600pc 15Value NPN PNP Transistor TO-92 Assortment Kit Set /Box Hot picture

Portable 600pc 15Value NPN PNP Transistor TO-92 Assortment Kit Set /Box Hot

$12.66







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