You can't use CSS file syntax you have to use DOM style (i.e. 'cssFloat' not
'float').

Try something like:


        FlowPanel searchPanel = new FlowPanel();
        Label leftPanel = new Label("Left"); // Or whatever
        Label rightPanel = new Label("Right");

        RootPanel.get().add(searchPanel);
        searchPanel.add(leftPanel);
        searchPanel.add(rightPanel);

        searchPanel.setWidth("100%");
        searchPanel.getElement().getStyle().setProperty("border", "1px solid
black");

        leftPanel.getElement().getStyle().setProperty("cssFloat", "left");

        rightPanel.getElement().getStyle().setProperty("cssFloat", "right");


Ian

http://examples.roughian.com

2009/12/23 mwaschkowski <[email protected]>

> Hi,
>
> I've been having great difficulty with 2.0 panels. I've read over the
> docs at:
>
>  http://code.google.com/webtoolkit/doc/latest/DevGuideUiPanels.html
>
> and moved over to standards mode. I've found that a lot of widget that
> used to display scrollbars just don't anymore. I've tried using the
> new layoutpanels, but getting hung up now because of sizing issues - I
> now have to declare the sizes explicitly, and now there are layout
> issues (some of the page not being displayed depending on the
> browser).
>
> Well, first off, I decided to do something simple like replace my
> horizontal panel with a flow panel. This horizontal panel (hp) was
> 100% width, had a widget on the left and a widget on the right.
> Because the docs cautioned that HorizontalPanels might not work with
> standards mode, I did the following (using the float suggestion in the
> docs):
>
>                FlowPanel searchPanel = new FlowPanel();
>                DOM.setElementProperty(searchPanel.getElement(), "border",
> "1px
> solid black");
>                searchPanel.setWidth("100%");
>                searchPanel.add(leftPanel);
>                DOM.setElementProperty(leftPanel.getElement(), "float",
> "left");
>                searchPanel.add(rightPanel);
>                DOM.setElementProperty(rightPanel.getElement(), "float",
> "right");
>
> As well, I tried to add a border so I could better see the layout.
> Neither the border is working, nor the floating of the widgets, help!
>
> Thanks,
>
> Mark
>
> --
>
> You received this message because you are subscribed to the Google Groups
> "Google Web Toolkit" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<google-web-toolkit%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/google-web-toolkit?hl=en.
>
>
>

--

You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.


Reply via email to