1. #1
    Sencha User
    Join Date
    May 2008
    Location
    Germany
    Posts
    59
    Vote Rating
    0
    LukasP is on a distinguished road

      0  

    Default [beta3] ContentPanel background color

    [beta3] ContentPanel background color


    Could someone help me with getting a ContentPanel background color to white completely?

    It works fine when not applying ContentPanel.setFrame(true) - but I would really like those round corners...

    If I do something like:

    Code:
    public void onModuleLoad() {
            Viewport vp = new Viewport();
            ContentPanel panel = new ContentPanel();
            HtmlContainer container = new HtmlContainer("<p>Hello world</p>");
            container.setStyleAttribute("backgroundColor", "white");
            container.setBorders(true);
            panel.setLayout(new FlowLayout());
            panel.setFrame(true);
            panel.setStyleAttribute("backgroundColor", "white");
            panel.add(container);
            vp.add(panel);
            RootPanel.get().add(vp);
    }
    I get a blue frame around my container which I would not like to have:
    panel.jpg

    This is not really crucial, but is there a solution other than changing the styles in ext-all.css?

    Cheers

  2. #2
    Ext GWT Premium Member gslender's Avatar
    Join Date
    Mar 2008
    Location
    Brisbane, Australia
    Posts
    1,572
    Vote Rating
    4
    gslender is on a distinguished road

      0  

    Default


    not the best solution, but try using a deferredCommand and that way it will be done after render. The other solution is to extend ContentPanel, override render(), call super.render() and do it after that...if that makes sense.

Thread Participants: 1