Board Logo

change icons dynamically
Sebastian - 9/27/2004 at 09:09 AM

Hello

Accidentally I wrote this Thread in the false forum... now again ;-)

is it possible, to change icons dynamically without changing the tree_items.js?
(so that there is no refresh of the site required to display the changed icon on the tree)

is there a method or function?


friendly regards
Sebastian


rock - 9/27/2004 at 10:18 AM

You could change icons/styles by dynamicaly modifing TREE_TPL var. E.g. to change root icons:

TREE_TPL['icon_48']='icons/base.gif'; // root icon normal
TREE_TPL['icon_52']='icons/base.gif'; // root icon selected
TREE_TPL['icon_56']='icons/base.gif'; // root icon opened
TREE_TPL['icon_60']='icons/base.gif'; // root icon selected opened

to apply changes don't forget to call state_lookup() function for the items which icons/styles had been changed.


Softcomplex: http://www.softcomplex.com/
Back to forum: http://www.softcomplex.com/forum/