我在 ScrollPanel 中有一个 Celltree。我在 UIBinder 中设置 ScrollPanel 的大小如下
<!DOCTYPE ui:UiBinder SYSTEM "http://dl.google.com/gwt/DTD/xhtml.ent">
<ui:UiBinder xmlns:ui="urn:ui:com.google.gwt.uibinder"
xmlns:g="urn:import:com.google.gwt.user.client.ui">
<g:ScrollPanel ui:field="panel" width="240px" height="1200px"></g:ScrollPanel>
</ui:UiBinder>
在我的 Java 类中,我有以下内容:
@UiField ScrollPanel panel;
public Arborescence() {
initWidget(uiBinder.createAndBindUi(this));
// Create a model for the tree.
TreeViewModel model = new CustomTreeModel();
/*
* Create the tree using the model. We specify the default value of the
* hidden root node as "Item 1".
*/
CellTree tree = new CellTree(model, "Item 1");
panel.add(tree);
}
我的问题是当我填充 CellTree 时,水平条不显示,甚至内容溢出。垂直条显示正常。
谢谢
更新
使用 FireBug,我看到问题来自element.style {
overflow: hidden;
}
似乎它是覆盖我的 CSS 的内联 CSS。有没有办法改变它?