# Treeview node properties

**URL:** <https://forum.servoy.com/t/treeview-node-properties/15347>\
**Category:** Classic Servoy\
**Created:** [January 15, 2012, 11:56am UTC](https://forum.servoy.com/t/treeview-node-properties/15347 "2012-01-15T11:56:10Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Foxclever](https://avatars.discourse-cdn.com/v4/letter/f/bcef8e/32.png) [@Foxclever](https://forum.servoy.com/u/Foxclever)\
**Post date:** [January 15, 2012, 11:56am UTC](https://forum.servoy.com/t/treeview-node-properties/15347/1 "2012-01-15T11:56:10Z")

</div>

Hi,

Is it possible to set the width, height and background colour separately on each node of a Treeview? Or, can the icon/graphic be set separately for each node?

I see in sourceforge there is a Servoy treeview bean, but have no idea how to access this; couldn’t find anything on Sourceforge to explain how I connect to or download something… ![:?]( "Confused")

Thanks,  
Gordon

---

<div class="post-metadata">

**Author:** ![Joas](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/joas/32/5095_2.png) [@Joas](https://forum.servoy.com/u/Joas)\
**Post date:** [January 20, 2012, 2:45pm UTC](https://forum.servoy.com/t/treeview-node-properties/15347/2 "2012-01-20T14:45:27Z")

</div>

The DBTreeview bean is shipped with Servoy, you can just drag it on your form from the palette:

[attachment=0]dbtreeview.png[/attachment]

The width of a node depends on the amount of text that you display.  
The height is the same for each node and can be set with the function **.setRowHeight(height)**.  
To show a different background color for each node, you can use html in the text dataprovider.

The icons used in the treeview are based on a dataprovider (can be a calculation), so they can be different for each node. Take a look at **binding.setImageMediaDataprovider()** and **binding.setImageURLDataprovider()**.

 ![dbtreeview.png](https://canada1.discourse-cdn.com/flex010/uploads/servoy/original/2X/5/5af434f6682c5c41333b8a442705601a48d432f5.png)

---

<div class="post-metadata">

**Author:** ![Foxclever](https://avatars.discourse-cdn.com/v4/letter/f/bcef8e/32.png) [@Foxclever](https://forum.servoy.com/u/Foxclever)\
**Post date:** [January 25, 2012, 9:11am UTC](https://forum.servoy.com/t/treeview-node-properties/15347/3 "2012-01-25T09:11:50Z")

</div>

Thanks Joas, I’ll see if I can work that out…
