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 Memory EEPROM 6ES5-375-0LC31, Made in Germany
$60.0
Siemens Memory EEPROM 6ES5-375-0LC31, Made in Germany picture10PCS AT24C04 24C04 Serial EEPROM SOP-8 ATMEL q1
$0.2
10PCS AT24C04 24C04 Serial EEPROM SOP-8 ATMEL q1 pictureNEW Adept Memory Card 32KB EEPROM # FMCE32 90400-02200 -- BNIB
$285.0
NEW Adept Memory Card 32KB EEPROM # FMCE32 90400-02200 -- BNIB pictureElectronic Solutions 8000d087AW-C Multi EEPROM VME Board
$79.99
Electronic Solutions 8000d087AW-C Multi EEPROM VME Board picture170202 New-No Box, Mitsubishi FX-EEPROM-4 FX Memory Cassette
$47.19
170202 New-No Box, Mitsubishi FX-EEPROM-4 FX Memory Cassette picture






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