PDA

View Full Version : Difference rendering LayoutContainer in FF vs IE



cpopp
25 Nov 2009, 10:17 AM
I'm creating a custom MessageBox so I can do things like add animated gif and control the look and feel.

I have a class that extends Window



setModal(true);
setClosable(false);
setFrame(false);
setShadow(false);

HBoxLayout layout = new HBoxLayout();
layout.setHBoxLayoutAlign(HBoxLayoutAlign.MIDDLE);
layout.setPadding(new Padding(5));

LayoutContainer lc = new LayoutContainer();
lc.setLayout(layout);
lc.setStyleAttribute("background", "eaf9ff");
lc.setBorders(true);
lc.setShadow(true);
lc.setWidth(300);
lc.setHeight(50);
lc.add(new Image("images/foo.gif");
lc.addText("Why does this look funny");
add(lc);

I display the widget with a .show() call.

When the widget is displayed in IE 7, everything looks great.
When the widget is displayed in FF 3.0, I lose the background color, the right side border is missing, and the text overlaps my Image by a few pixels.

I'm wondering if anyone else has encountered this issue.

cpopp
25 Nov 2009, 12:44 PM
I solved the problem

To render all 4 borders I had to apply a setSize(x, y) to the window.

To fix the background color issue, I had to change my style attribute from "background" to "backgroundColor"

I'm still working on the missing shadow.