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

SIEMENS G-53M RAM CARD & TEXAS INSTUMENTS G-53M RAM CARD
$25.0
SIEMENS G-53M RAM CARD & TEXAS INSTUMENTS G-53M RAM CARD pictureSchrader Bellows Econo Ram II FW2B106501 - Lot of 2
$40.0
Schrader Bellows Econo Ram II FW2B106501 - Lot of 2 pictureRicoh Pro C5100 C5100S 512 MB RAM Memory D1365716A / D1365716 OEM
$69.99
Ricoh Pro C5100 C5100S 512 MB RAM Memory D1365716A / D1365716 OEM pictureTELEMECANIQUE TSX-RAM-51216 TSXRAM51216
$399.99
TELEMECANIQUE TSX-RAM-51216 TSXRAM51216 pictureKonica Minolta Bizhub C552 Nvram NV Ram Pack +
$79.0
Konica Minolta Bizhub C552 Nvram NV Ram Pack + picture






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