Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
New Contributor
Posts: 3
Registered: ‎05-03-2012
My Device: Bold 9900
My Carrier: NC

Issue with Custom EditFields on Bold9900

I'm trying to make a form with custom editfields (editfield with a background image). I have an bitmapField above this form and when i'm scrolling on my view editfields mix like on the snapshots.
This issue does not appear on Bold 97000 OS6 and never on Bold99000 simulator.
Does someone know this issue. I let you my code.

 

 

mainManager = new VerticalFieldManager(

Manager.NO_VERTICAL_SCROLL

Manager.NO_VERTICAL_SCROLLBAR | HorizontalFieldManager.USE_ALL_WIDTH );

 

BitmapField  b =new BitmapField(Bitmap.getBitmapResource("logoptt.png"), Field.NON_FOCUSABLE| Field.FIELD_VCENTER| Field.FIELD_HCENTER| Field.USE_ALL_WIDTH);

 

mainManager.add(b);

 

LabelField label2= new LabelField(please,Field.NON_FOCUSABLE)

{

protected void paint(Graphics g) 

{       

g.setColor(0X454545);

super.paint(g);

}

};

Font myFont2 = Font.getDefault().derive(Font.PLAIN, 22, Ui.UNITS_px);

label2.setFont(myFont2);

 

String instant_win = _resources.getString(instant_win_tshirt);

message= new LabelField(instant_win ,LabelField.HFULL | LabelField.USE_ALL_WIDTH)

{

protected void paint(Graphics g) 

{       

g.setColor(0X818181);

super.paint(g);

}

};

Font myFont = Font.getDefault().derive(Font.PLAIN, 22, Ui.UNITS_px);

message.setFont(myFont);

 

image =new BitmapField(Bitmap.getBitmapResource("photo_tshirt.png"), Field.FIELD_VCENTER| Field.FIELD_HCENTER);

 

TitleBig =new CustomLabelField(title);

 

FieldListener listener = new FieldListener();

submitButton = new PictureBackgroundButtonField(s_send,"red");

submitButton.setChangeListener(listener);

 

EncodedImage enc_img=EncodedImage.getEncodedImageResource("field.png");

firstName_field=new CustomTextBox(enc_img,s_firstName);

lastName_field=new CustomTextBox(enc_img,s_lastName);

email_field=new CustomTextBox(enc_img,s_email);

tel_field=new CustomTextBox(enc_img,s_tel);

 

TitleBig.setMargin(20, 10, 20, 10);

message.setMargin(10, 10, 10, 10);

image.setMargin(20, 10, 20, 10);

label2.setMargin(10,10, 10, 10);

lastName_field.setMargin(10, 0, 10, 0);

email_field.setMargin(10, 0, 10, 0);

tel_field.setMargin(10, 0, 20, 0);

 

mainManager.add(TitleBig);

mainManager.add(message);

mainManager.add(image);

mainManager.add(label2);

mainManager.add(firstName_field);

mainManager.add(lastName_field);

mainManager.add(email_field);

mainManager.add(tel_field);

 

mainManager.add(submitButton); 

this.add(mainManager);