You need a style name set before you can set a dependent name.  So, to
the original poster, construct your FlowPanel.  Set its style name to
whatever, and then write your css rules to that.

Walden

On Oct 27, 3:18 am, hezjing <[EMAIL PROTECTED]> wrote:
> Hi
>
> To add the borders to a panel, we will create a style in CSS:
>
> .test {
>   background-color: red;
>   border: thin solid #000000;
>   margin: 10px;
>
> }
>
> Then set the style to a panel like this:
>
> FlowPanel panel = new FlowPanel();
> panel.setWidth("100%");
> panel.setHeight("100%");
> // panel.addStyleDependentName("test") does not work?
> panel.setStyleName("test");
>
> Why the above code works with setStyleName() but nothing happen when calling
> addStyleDependentName()?
>
> On Mon, Oct 27, 2008 at 12:43 AM, hezjing <[EMAIL PROTECTED]> wrote:
> > Hi
> > How can I draw a border, and set the background color of a FlowPanel?
>
> > I think this should be done via CSS (right?) but unfortunately, I don't
> > find the CSS style rules from the API doc.
>
> > --
>
> > Hez
>
> --
>
> Hez
--~--~---------~--~----~------------~-------~--~----~
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