PDA

View Full Version : Having problem laying out form in IE 7 but it works in FF 3.6.8



marman
24 Aug 2010, 12:45 PM
I am trying to get a layout to work between IE7 and FF 3.6.8. Things look good in FF, but IE pushes two of my components down to another row.


Firefox 3.6.8
22109


IE 7
22108




divisionCombo = new DivisionCombo();
marketCombo = new MarketCombo();

Button buttonAddMarket = new Button( "Add Market" );
buttonAddMarket.setStyleAttribute( "padding-left", "10px" );
buttonAddMarket.setStyleAttribute( "padding-right", "50px" );
buttonAddMarket.addSelectionListener( new SelectionListener<ButtonEvent>()
{
@Override
public void componentSelected( ButtonEvent ce )
{
//Dispatcher.forwardEvent( ChangeMappingController.HIDE_ALL );
}
} );


LayoutContainer divisionContainer = new LayoutContainer();
FormLayout formLayout = new FormLayout();
formLayout.setLabelWidth( 60 );
divisionContainer.setLayout( formLayout );
divisionContainer.add( divisionCombo );

LayoutContainer marketContainer = new LayoutContainer();
FormLayout formLayout2 = new FormLayout();
formLayout2.setLabelWidth( 60 );
marketContainer.setLayout( formLayout2 );
marketContainer.add( marketCombo );

/* LayoutContainer marketButtonContainer = new LayoutContainer();
marketButtonContainer.setLayout( new FormLayout() );
marketButtonContainer.add( buttonAddMarket );*/

ColumnLayout columnLayout = new ColumnLayout();
//super.setWidth( 900 );
super.setLayout( columnLayout );
super.add( divisionContainer );
//super.add( new Spacer( 20 ), new ColumnData() );
super.add( buttonAddMarket );
super.add( marketContainer );

super.setStyleAttribute( "background", "#eeeeee" );

sven
24 Aug 2010, 12:50 PM
Can you try to post a fully working testcase of your problem that implements EntryPoint?

On your addMarket button you are setting a padding, however you probably want to set a margin.

marman
25 Aug 2010, 4:56 AM
thanks for the reply sven. I was in a rush to get out of the office yesterday so i did not attach more code. While dumbing it down this morning, I could not reproduce the issue in the stripped down version. I tested the code in Chrome 6 and it works fine just like Firefox. Very frustrating...

Rather than use my own Layout, i switched to the HorizontalPanel and it works in IE now. Not sure why a column layout was not working, but i am behind schedule and have no time to investigate further. Thanks for the help. Oh...i changed to use css margin rather than padding too. thanks for the pointer.