BlackBerry Forums Support Community               

Closed Thread
 
LinkBack Thread Tools
Old 05-22-2009, 08:22 AM   #1 (permalink)
Knows Where the Search Button Is
 
Join Date: Apr 2009
Model: 8100
PIN: N/A
Carrier: vodafone
Posts: 33
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default Change color of specific text only in text box for blackberry

Please Login to Remove!

Hi there,

How to Change color of specific text only in text box for blackberry?

Please help.

Thanks in advance.
Offline  
Old 05-22-2009, 11:07 AM   #2 (permalink)
BlackBerry B Boy
 
jeremyckitching's Avatar
 
Join Date: Apr 2007
Model: 9700
OS: 5.0.0.415
PIN: 215BE1F8
Carrier: T-Mobile U.S.A.
Posts: 4,243
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Wirelessly posted (BlackBerry Curve 8900)

I am not sure this is possible. I haven't seen options for changing the text color.
Offline  
Old 05-22-2009, 11:09 AM   #3 (permalink)
Thumbs Must Hurt
 
Join Date: Jan 2007
Model: 8800
Carrier: Orange
Posts: 181
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

You can override the paint method of the text field, with something like:

Code:
LabelField redLabelField = new LabelField("MyText) {
    public void paint(Graphics g) {
        g.setColor(Color.RED);  
        super.paint(g);
    }
}
Offline  
Old 05-22-2009, 11:23 AM   #4 (permalink)
BlackBerry B Boy
 
jeremyckitching's Avatar
 
Join Date: Apr 2007
Model: 9700
OS: 5.0.0.415
PIN: 215BE1F8
Carrier: T-Mobile U.S.A.
Posts: 4,243
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Wirelessly posted (BlackBerry Curve 8900)

Whoops! Didn't realize this was in the developers forum.
Offline  
Old 05-25-2009, 01:54 AM   #5 (permalink)
Knows Where the Search Button Is
 
Join Date: Apr 2009
Model: 8100
PIN: N/A
Carrier: vodafone
Posts: 33
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Also How can I make the Textfield editable after changing colors...?
Offline  




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