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?

有帮助吗?

解决方案

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

其他提示

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);
    }
}
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top