The whole problem (as pointed out in that discussion thread) is that a <div> is rendered with "display:block;", thus forcing newlines... The fix is to sprinkle in a style that forces "display:inline;"...
Label prefix = new Label( "prefix " );prefix.addStyleName( "inline-label" );Label link = new Label( "foo bar" );link.addStyleName( "hyperlink" );link.addStyleName( "inline-label" );Label suffix = new Label( " suffix" );suffix.addStyleName( "inline-link" );Panel flow = new FlowPanel();flow.add( prefix );flow.add( link );flow.add( suffix );
And in the CSS:
.hyperlink {color: blue;text-decoration: underline;cursor: pointer;}.inline-label {display: inline !important;}
1 comment:
If gwt 1.5, any difference?
Post a Comment