BlackBerry Forums Support Community               

Closed Thread
 
LinkBack Thread Tools
Old 04-09-2007, 07:57 AM   #1 (permalink)
Knows Where the Search Button Is
 
Join Date: Jan 2007
Model: 7230
Posts: 16
Post Thanks: 0
Thanked 0 Times in 0 Posts
Thumbs down Problem with RichTextField

Please Login to Remove!

Hi All,

I have problem with RichTextField. I want to use Gradient with RichTextField. It is Possible or Not While I have used Gradient with LabelField its working. With LabelField I have written this line of code.



private static final int LIGHT_TEXT = 0x00ffffff;
private static final int DARK_TEXT =0x00990000;
private static final int BACKGROUND =0x00008800;
private static final int HIGHLIGHT = 200;
private final int[] cols = new int[]{BACKGROUND,HIGHLIGHT,LIGHT_TEXT,DARK_TEXT};


LabelField title1 = new LabelField("Overall Competency Compliance", LabelField.ELLIPSIS|LabelField.USE_ALL_WIDTH)
{
public void paint(Graphics g)
{

g.setColor(0x00ffffff);
g.setFont((Font.getDefault()).derive(Font.BOLD,30 ));
int rowHeight = this.getPreferredHeight();
System.out.println("rowHeight:"+rowHeight);
int[] yInds = new int[]{0, 0, rowHeight,rowHeight};
System.out.println("g.getScreenWidth():"+g.getScr eenWidth());
int[] xInds = new int[]{0, g.getScreenWidth(), g.getScreenWidth(), 0};
g.drawShadedFilledPath(xInds, yInds, null, cols, null);
super.paint(g);
}
};

But this code not working with RichTextField. What will have to do for that purpose and where i am wrong plz guide me. This is very urgent.
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

Avst Callxpress Telecom Server 2003
$29.99
Avst Callxpress Telecom Server 2003 picture1 PC Yaskawa server SJDE-01APA 100W 220V used
$201.0
1 PC Yaskawa server SJDE-01APA 100W 220V used pictureIntellution iFix Webspace Server version 5.5 USB key
$100.0
Intellution iFix Webspace Server version 5.5 USB key pictureESI Communications Server ESI-50 Phone System 6 Port 60 Hour Voicemail
$699.0
ESI Communications Server ESI-50 Phone System 6 Port 60 Hour Voicemail pictureBlack Server 3 Pocket Waitress Waist Apron Blue Skulls Name FREE Lady Pizazz
$10.0
Black Server  3 Pocket Waitress Waist Apron Blue Skulls Name  FREE Lady Pizazz picture






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