Checkbox only for leafs and not folders

I have a DHTML Tree with check box enabled.

I need a functionality where in I want to display the checkbox only for the leafs and not for the folders.

How can I achieve this…?

tree.enableCheckBoxes(1) enables check boxes for all the nodes irrespective of weather its a folder or a leaf.

Please provide directions.


You can show hide checkboxes for any necessary node(s) by
    tree.showItemCheckbox(‘1’,false)   //hide checkbox for item with ID=1

To made things more simple , you can specify it directly in XML

    <item id=“3” nocheckbox=“1” text=“Without checkbox” />