BlackBerry Forums Support Community               

Closed Thread
 
LinkBack Thread Tools
Old 09-01-2008, 10:43 AM   #1 (permalink)
Talking BlackBerry Encyclopedia
 
Join Date: Jan 2008
Location: France
Model: 8310
PIN: N/A
Carrier: Vodafone
Posts: 217
Post Thanks: 0
Thanked 0 Times in 0 Posts
Question Some questions

Please Login to Remove!

Hi everyone.

I have few questions.

First how can I delete or remove a title?? I try somethings likes deleteAll() but the title is still here. I try to check if the field is visible and delete it with :

Code:
if(applicationTitle.isVisible())
    delete(applicationTitle);
But I have a nullPointerException.


Then I'd like to know how can I put sone text in bold.

Tel : XXXXXXX

I use an EditField and I want to have :

Tel : XXXXXXX


Then I want the cursor that can focus on all the phone number and when clic on it invoke the phone with this number.

I know how to invoke the phone so just tell me how I can highlight the number and associate an action with it.


And finally how can I split a string easily??? Around some caracter such "\n".


Any clue or answer will be appreciated

Thanks
Offline  
Old 09-01-2008, 01:45 PM   #2 (permalink)
CrackBerry Addict
 
Join Date: May 2005
Location: Golden, CO US
Model: 9700
Carrier: ATT
Posts: 684
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

setTitle((Field)null);

Check out the Active* fields in net.rim.device.api.ui.component. They'll automatically highlight phone numbers (and other things like web and email addresses) and let you click on them.

No "split" methods so you'd have to do it yourself with a loop.
Offline  
Old 09-02-2008, 03:28 AM   #3 (permalink)
CrackBerry Addict
 
Join Date: Apr 2005
Location: hamburg, germany
Model: 8900
Carrier: o2
Posts: 838
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

setTitle("") does also work.

putting only part of the field in bold does not work with the standard fields. you have to extend editfield or use two fields. i would suggest that you take a horizontalfieldmanager, put a labelfield with bold font and an editfield without a title into it and use the hfm as a normal field.

as RemyJ already said, activeautotexteditfield should cover this.

implement yourself StringTokenizer, it is a handy class to have anyhow.
__________________
java developer, Devinto, hamburg/germany
Offline  
Old 09-02-2008, 04:32 AM   #4 (permalink)
Talking BlackBerry Encyclopedia
 
Join Date: Jan 2008
Location: France
Model: 8310
PIN: N/A
Carrier: Vodafone
Posts: 217
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

When I try setTitle("") I have a label empty but setTitle((Field)null) works perfectly.

I will look at the activeautotextedifield as you said.

Can you be more explicit ont the horizontalfieldmanager you suggest???
Offline  
Old 09-02-2008, 05:52 AM   #5 (permalink)
Talking BlackBerry Encyclopedia
 
Join Date: Jan 2008
Location: France
Model: 8310
PIN: N/A
Carrier: Vodafone
Posts: 217
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

For the activeautotextedifield what is the option that select all the field automatically??

I try HIGHLIGHT_SELECT and HIGHLIGHT_FOCUS but the entire text isn't selected.

Only one caracter at a time is selected
Offline  
Old 09-03-2008, 05:18 AM   #6 (permalink)
Talking BlackBerry Encyclopedia
 
Join Date: Jan 2008
Location: France
Model: 8310
PIN: N/A
Carrier: Vodafone
Posts: 217
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

So what's the next step???
Offline  
Old 09-08-2008, 03:34 AM   #7 (permalink)
Talking BlackBerry Encyclopedia
 
Join Date: Jan 2008
Location: France
Model: 8310
PIN: N/A
Carrier: Vodafone
Posts: 217
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Up please.

Thanks
Offline  
Old 09-10-2008, 05:18 AM   #8 (permalink)
Talking BlackBerry Encyclopedia
 
Join Date: Jan 2008
Location: France
Model: 8310
PIN: N/A
Carrier: Vodafone
Posts: 217
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

How can I put the labelfield in bold??
Offline  
Old 09-12-2008, 09:09 AM   #9 (permalink)
Talking BlackBerry Encyclopedia
 
Join Date: Jan 2008
Location: France
Model: 8310
PIN: N/A
Carrier: Vodafone
Posts: 217
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Allright I found the solution for the bold font and for the string check's.

But now how can I make the AutoActiveField higlight the entire field and not character by character???
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.