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.setFont((Font.getDefault()).derive(Font.BOLD,30 ));
int rowHeight = this.getPreferredHeight();
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);

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.

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