DHTMLXTree Icons

Hi! Im evaluating Tree, im constructing XML with a Handler PHP page, how do i set icons following the next example?



$records = “Select * from myTable”;

do

{

    $contents .= “<item child='” . $Childs .

        “‘id=’” . $records->fields[“MY_ID”] .

        “‘text=’”. $records->fields[“NAME”] . “'>” .

        swicht ( $records->fields[“TYPE”] )

        {

            A DIFFERENT TYPE OF ICON FOR EACH XML ITEM!!!

        }

        “” . $records->fields[“MY_ID”] . “”;

}

while ($records->movenext() );

echo $contents;

------------------------------------------------------------

Regards, oVox.

It will look similar to next

    $contents .= “<item child=’” . $Childs .

        “‘id=’” . $records->fields[“MY_ID”] .

        “‘text=’”. $records->fields[“NAME”]."’";
        switch ( $records->fields[“TYPE”] )

        {

             case “some”:
                 $contents.=" im0=‘customImage1.gif’ ";
        }


    $contents .= “>” ;


im0 - image of leaf
im1 - image of closed folder
im2 - image of opened folder

Ok, last question, here is your XML data example:

<?xml version='1.0' encoding='iso-8859-1'?> true

I can’t find the property that sets the image path for skins, i want to set the vista style “csh_vista”
Regards, oVox.

Actually this parameter can’t be set from XML, while init tree you have line similar to next
    tree.setImagePath("…/imgs");
the “…/imgs” is a path to folder with images used in tree, just point it to necessary one to switch design ( …/imgs/csh_vista or something similar )