BlackBerry Forums Support Community               

Closed Thread
 
LinkBack Thread Tools
Old 11-05-2008, 06:28 AM   #1 (permalink)
Thumbs Must Hurt
 
Join Date: May 2007
Location: berlin, germany
Model: 8310
PIN: N/A
Carrier: vodafone
Posts: 163
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default BackgroundColor in EditField

Please Login to Remove!

Hi,
i have created my on EditField, it looks like this one here:
PHP Code:
public class myEdit extends EditField {
    public 
boolean farbe;
    public 
myEdit(String labelString defaultString) {
        
super(labeldefaultString);
    }

    protected 
void layout(int widthint height) {
        
setExtent(100getFont().getHeight());
    }

    public 
void paint(Graphics graphics) {
         
graphics.clear();
        if (
farbe == true) {
            
graphics.setBackgroundColor(0xf7ce40);
            
graphics.drawRect(0,15,35,1);
            
super.paint(graphics);
        }
//*/
        
graphics.drawLine(0,0,10,0);
        
graphics.setColor(Color.BLACK);
        
super.paint(graphics);
        
invalidate();
    }
    
    public 
void setFarbe(boolean ok) {
        
farbe ok;
    }
    protected 
void update(int delta) {
    }
   public 
void onUnfocus() {
        
this.invalidate();
    }
    public 
boolean isFocusable() {
        return 
true;
    }
// end of myEdit 
ok, the Field is painted correctly.
now i want to set the focus to an other Field using the trackball then the next Field is focused.
then i take a look at the unfocused editfield and there is still a blue bar (from the cursor)

so how do i remove this blue bar?

thanks hibbert
__________________
My English is so bad, that makes me nobody so quickly after
Offline  




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