PDA

View Full Version : Validation Icon partially obscured in Form


peternorman
03-20-2009, 03:49 PM
I'm currently trying to create a simple form with three fields laid out horizontally. Everything is working fine except for the fact that when a validation error occurs the validation icon is partially obscured. I have tried to add padding and margins via setStyleAttribute and through the css file and than calling addStyle ( "style name here" ) but to no avail. Any help would be appreciated.

I have attached my code and a screen shot.


public ContentPanel buildInputPanel2 ()
{
FormData formData = new FormData ( "%100" );
FormPanel panel = new FormPanel ();
panel.setHeaderVisible ( false );
panel.setLayout ( new FlowLayout () );
panel.setSize ( 700, -1 );

LayoutContainer main = new LayoutContainer ( new ColumnLayout () );

FormLayout layout = new FormLayout ();
layout.setLabelAlign ( FormPanel.LabelAlign.TOP );

LayoutContainer left = new LayoutContainer ( layout );
left.setStyleAttribute ( "marginRight", "15px" );

TextField<String> name1 = new TextField<String> ();
name1.setFieldLabel ( "Name" );
name1.setEmptyText ( "Enter A Presentation Name..." );
left.add ( name1, formData );

LayoutContainer center = new LayoutContainer ();
center.setStyleAttribute ( "marginRight", "15px" );

layout = new FormLayout ();
layout.setLabelAlign ( FormPanel.LabelAlign.TOP );
center.setLayout ( layout );

FormData startData = new FormData ( "%100" );

DateField start1 = new DateField ();
start1.setFieldLabel ( "Start Date" );
start1.setEmptyText ( "Enter A Start Date..." );
start1.getPropertyEditor ().setFormat ( dtf );
center.add ( start1, formData );

LayoutContainer right = new LayoutContainer ();
right.setStyleAttribute ( "marginRight", "15px" );

layout = new FormLayout ();
layout.setLabelAlign ( FormPanel.LabelAlign.TOP );
right.setLayout ( layout );

FormData endData = new FormData ( "%100" );

DateField end1 = new DateField ();
end1.setFieldLabel ( "End Date" );
end1.setEmptyText ( "Enter A Start Date..." );
end1.getPropertyEditor ().setFormat ( dtf );
right.add ( end1, formData );

main.add ( left, new com.extjs.gxt.ui.client.widget.layout.ColumnData ( .3 ) );
main.add ( center, new com.extjs.gxt.ui.client.widget.layout.ColumnData ( .25 ) );
main.add ( right, new com.extjs.gxt.ui.client.widget.layout.ColumnData ( .25 ) );

panel.add ( main );

return panel;
}
http://i111.photobucket.com/albums/n153/peternorman/example.jpg