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
Highlighted
New Developer
Posts: 81
Registered: ‎03-22-2013
My Device: 9900,9930,9790,9780,9330
My Carrier: Blackberry
Accepted Solution

How to change background color of autoCompleteField.

Hello All,

 

I used AutoCompleteField in my app. I have to change background color of AutoCompleteField.

I used

 

-autoCompleteField.getEditField().setBackground(BackgroundFactory.createSolidBackground(1644825))

 

but it not fill whole area in black color. It shows black color at middle with white edges . I need whole background color to be black.


Please anyone tell me how to make autoCompleteField background as black?

 

Thanks in Advance.

 

Developer
Posts: 19,636
Registered: ‎07-14-2008
My Device: Not Specified

Re: How to change background color of autoCompleteField.

        autoCompleteField.setBackground(BackgroundFactory.createSolidBackground(0x0000ff));
        XYEdges edges = new XYEdges(10,10,10,10);
        Border newBorder = BorderFactory.createRoundedBorder(edges, 0xFF0000, Border.STYLE_SOLID);
        autoCompleteField.getEditField().setBorder(newBorder);
        autoCompleteField.getEditField().setBackground(BackgroundFactory.createSolidBackground(0x00FF00));

Try this for some ideas on what you need to change:

 

 

New Developer
Posts: 81
Registered: ‎03-22-2013
My Device: 9900,9930,9790,9780,9330
My Carrier: Blackberry

Re: How to change background color of autoCompleteField.

Thanks Peter.

 

Its great solution for me It works perfectly.