在qooxdoo的树中,您可以为每个树项设置MaxHeight:
var tree = new qx.ui.tree.Tree(); tree.set({ 宽度:500, 身高:500 }); this.getRoot()。add(tree,{left:10,top:10});
// create and set the tree root
var root = new qx.ui.tree.TreeFolder("Desktop");
tree.setRoot(root);
// create some subitems
var f1 = new qx.ui.tree.TreeFolder("Logos");
f1.setMaxHeight(10);
这很有效。但我想知道你是否可以用虚拟树做到这一点?
答案 0 :(得分:0)
您可以在"虚拟树"中设置虚拟树的项目高度。外观
在你的主题/ Appearance.js中:
qx.Theme.define("application.theme.Appearance",
{
extend: qx.theme.modern.Appearance,
appearances: {
"virtual-tree": {
include: "tree",
style: function (states) {
return {
itemHeight: 10,
};
}
}
}
});