PDA

View Full Version : set treeicons size bigger



radbyx
15 Jan 2009, 1:37 AM
Hi,
My leaficons in my tree are to big and is being chopped, witch is a problem. Is there a way I can set the size of those icons to 20px? I think 16px is max af default.

I'm using the icon provider and can't change that.


binder.setIconProvider(new ModelStringProvider<TreeNode>() {
public String getStringValue(TreeNode model, String property) {
if (model instanceof TreeNodeTreeType) {
TreeNodeTreeType leaf = (TreeNodeTreeType) model;
if (leaf.getTreeTypeItem() != null && leaf.getTreeTypeItem().getPictogramName() != null) {
return_imagesPictogramsPath + leaf.getTreeTypeItem().getPictogramName();
}
}
returnnull;
}
});

gslender
15 Jan 2009, 5:10 AM
use firebug to find the styles you need to change (for width/height), and then apply those styles to the element etc...

radbyx
15 Jan 2009, 6:48 AM
Thx alot bro, it worked right away!

For others, here is the little thing I had to do:

I chanced this code in ext-all.css to:

.my-tree-icon div {
width: 21px;
height: 21px;
cursor: pointer;
}