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のようです。それを変更する方法はありますか?