Dhtmlx tree - loading message

Hi,



I’m using tree.enableLoadingItem(text). Can you show me how to change im0, im1 and im2 values for the temporary item?



Also how can I change the color/style of the text of temporary item?



Thanks!


Hello,


you can place html element with a certain style as a text. That will allow to set teh necessary color:


tree.enableLoadingItem(“

Loading…
”);


In order to change the image you should modify the dhtmlxtree_lf.js:


please locate the following line here


this.insertNewItem(id,“fake_load_xml_”+id,this.tfi_text);


and add the image name as the 5th parameter:


this.insertNewItem(id,"fake_load_xml
"+id,this._tfi_text,false,IMAGE);

Hello,

Thank you for your response.

I modified dhtmlxtree_lf.js per above instruction and the new image was displayed for im0 (leaf item).

However, im1 default image (folderOpen.gif - folder in open state) was momentarily displayed before
the fake item (Loading…) was deleted. Is there a way to modify im1 and im2 default values of the fake item?

Thanks again!

Nevermind! found the solution.

Added the 3 images in this.insertNewItem.

Thanks!

Hello,

Thank you for your response.

I modified dhtmlxtree_lf.js per above instruction and the new image was displayed for im0 (leaf item).

However, im1 default image (folderOpen.gif - folder in open state) was momentarily displayed before
the fake item (Loading…) was deleted. Is there a way to modify im1 and im2 default values of the fake item?

Thanks again!


Hello,


You can also set 2 other images in the this.insertNewItem method


this.insertNewItem(id,“fake_load_xml_”+id,this._tfi_text,false,IMAGE,IMAGE,IMAGE);