Pergunta

I have created a custom css for tree and other widgets.

I have made the following entry

<inherits name='com.google.gwt.user.theme.standard.Standard' />
<stylesheet src="CustomStylesheet.css" />

But still only some of the styles are getting picked up and others don't. Has anyone faced a similar problem?

Foi útil?

Solução

It will be either one of the below,

Either you have to use CSS Resource as mentioned by Andrew or you have missed Doctype declaration.

You can also visit this link: doctype explantion w.r.t to GWT

Outras dicas

you should write the same style classnames with "com/google/gwt/user/cellview/client/CellTree.css" css file and you may change content css

pulic class MyClass extends Composite {
   public interface MyResources extends CellTree.Resources {

        @ImageResource.ImageOptions(flipRtl = true)
        @Source("cellTreeClosedItem.gif")
        ImageResource cellTreeClosedItem();

        @ImageResource.ImageOptions(flipRtl = true)
        @Source("cellTreeOpenItem.gif")
        ImageResource cellTreeOpenItem();

        @Override
        @Source({"com/google/gwt/user/cellview/client/CellTree.css"})
        CellTree.Style cellTreeStyle();
    }

    private MyResources res = GWT.create(MyResources.class);


    public void onInitialize(){
        cellTree = new CellTree(treeViewModel, null, res);
    }
}
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top