3

I am using BrowserField component of RIM BB. It is right now displaying a white background. I want make a transparent background, so it could match with the Manager's background color.

I had tried with below code. But it's not working.

BrowserField contentField = new BrowserField();
bgTransparent = BackgroundFactory.createSolidTransparentBackground(0xffffff, 0);    
contentField.setBackground(bgTransparent);

How to solve this?

Nate
  • 30,589
  • 12
  • 76
  • 201
nisha.113a5
  • 1,917
  • 15
  • 29
  • will you try this ? setBackground(BackgroundFactory.createSolidBackground(Color.BLACK)) – Signare Sep 14 '12 at 09:25
  • setBackground(BackgroundFactory.createSolidBackground(Color.BLACK)) is not working. – nisha.113a5 Sep 14 '12 at 09:38
  • 1
    Check documentation of the method `setBackground(int color)` here, http://www.blackberry.com/developers/docs/6.0.0api/net/rim/device/api/browser/field2/BrowserField.html#setBackground%28int%29. It says that, `color - the color to set the background to (in the form: 0xRRGGBB)`, and the value of color doesn't have any alpha value. – Rupak Sep 14 '12 at 13:42
  • I applied this but its not working... :( – nisha.113a5 Sep 14 '12 at 14:18
  • This isn't exactly making the background *transparent*, but if you are just looking to match the underlying background, [you can see this similar question](http://stackoverflow.com/a/15168757/119114) for a workaround. – Nate Mar 04 '13 at 08:48

0 Answers0