Categories | Question details Back To List | ||
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!!!! } "<userdata name='" . $records->fields["MY_ID"]."'>" . $records->fields["MY_ID"] . "</userdata></item>"; } while ($records->movenext() ); echo $contents; ------------------------------------------------------------ Regards, oVox. Answer posted by Stanislav on Dec 04, 2007 10:03 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 Answer posted by oVox on Dec 04, 2007 11:00 Ok, last question, here is your XML data example: <!--StartFragment--><?xml version='1.0' encoding='iso-8859-1'?> I can't find the property that sets the image path for skins, i want to set the vista style "csh_vista" Regards, oVox. Answer posted on Dec 05, 2007 01:36 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 ) |