BlackBerry Forums Support Community
              

Closed Thread
 
LinkBack Thread Tools
Old 03-14-2007, 01:27 AM   #1 (permalink)
Knows Where the Search Button Is
 
Join Date: Dec 2006
Model: 8700
Carrier: airtel
Posts: 31
Post Thanks: 0
Thanked 0 Times in 0 Posts
Thumbs down Changing background color

Please Login to Remove!

hi
I am using mainscreen, and in the header part only i want to paint.I want to use gradient.But i dont know whether it is posiible or not.
So,i want to paint half of it with green and rest with red.Then i added button.
When i run it i am not able to see the color at header part.
Can any say how to solve this problem.
the bellow is code.

ms=new MainScreen(){
public void paint(Graphics g)
{
g.setColor(0x0000ff00);
g.fillRect(0,0,super.getWidth()/2,10);
g.setColor(0x00ff0000);
g.fillRect(super.getWidth()/2,0,super.getWidth()/2,10);
g.clear();

super.paint(g);
}
};

b=new ButtonField("enter"){
public void paint(Graphics g)
{

g.clear();
super.paint(g);

}
};
b.setChangeListener(this);
ms.add(b);
pushScreen(ms);


Regards,
Balaji.K
Offline  
Old 03-14-2007, 04:10 AM   #2 (permalink)
Thumbs Must Hurt
 
Join Date: Jan 2007
Model: 8800
Carrier: Orange
Posts: 181
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

It looks to me like you're painting the header, then clearning it, then getting the superclass to paint over it. You want to make your changes after the super class paints, and don't clear.
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

Samsung SMT1921 19" LCD Display - CCTV Only
$39.0
Samsung SMT1921 19LEDwholesalers 60-Watt Samsung Chip LED Wall Pack Outdoor Light Fixture, UL &
$70.24
LEDwholesalers 60-Watt Samsung Chip LED Wall Pack Outdoor Light Fixture, UL & picture8-PCS K6T1008C2E-GB55 SRAM CHIP ASYNC SINGLE 5V 1M-BIT 128K X 8 55NS 32-PIN SOP
$16.26
8-PCS K6T1008C2E-GB55 SRAM CHIP ASYNC SINGLE 5V 1M-BIT 128K X 8 55NS 32-PIN SOP picture4-PCS K7A403600M -QC16T 128KX36 SYNCHRONOUS SRAM 7A403600MQC16 K7A403600MQC16T
$51.03
4-PCS K7A403600M -QC16T 128KX36 SYNCHRONOUS SRAM 7A403600MQC16 K7A403600MQC16T pictureSamsung DS-24D Black Display Speakerphone - Bad Handset Port
$59.99
Samsung DS-24D Black Display Speakerphone - Bad Handset Port picture






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