52
Views
5
Comments
Solved
[Tree Widget] Icones
Question
ss2-jpg
Web icon
Forge asset by Paulo Ramos

Is it possible to change the tree icon element? I Included news images in the treewidget and pass the image name on parameter. It works, but when I expand the element to a new level, this element looses the icon image (see attached file). The same occurs if I use the node icon. Only with the folder icon this do not happen.


Thanks,


Roberto


treewidget.png
2016-01-12 10-35-24
Paulo Ribeiro
Solution

Hello again Roberto,


I played with the Tree Widget a bit and I think I found out the problem.


I had no problem changing the icon of the leaf items, but changing the icon of the folder items was not working. I took a look into the JavaScript that generates the tree and found out that when the folder is opened in the tree, the script appends "_opened" to the name of the image. So for example if you were trying to use the icon "movie", the script would try to open an image called "movie_opened.png" instead.


I managed to solve this easily by simply making a copy of the icon and renaming that copy to include the "_opened" suffix:



Here's the result:


I hope this helps.

2016-01-12 10-35-24
Paulo Ribeiro

Hello Roberto,


You customized the Tree Widget component to include your own images, correct? Could you please share your customized .oml so that I can have a look and possibly figure out what's wrong?

2018-06-14 12-24-08
Roberto Campos

Hi Paulo,

Follows in the attached file the treewidget customized with new icons. I only added new images and in my application I send the name of the new images. But this problem also happens with the node or movie icons.

Obrigado,

Roberto

TreeWidget_Customized.oml
2016-01-12 10-35-24
Paulo Ribeiro
Solution

Hello again Roberto,


I played with the Tree Widget a bit and I think I found out the problem.


I had no problem changing the icon of the leaf items, but changing the icon of the folder items was not working. I took a look into the JavaScript that generates the tree and found out that when the folder is opened in the tree, the script appends "_opened" to the name of the image. So for example if you were trying to use the icon "movie", the script would try to open an image called "movie_opened.png" instead.


I managed to solve this easily by simply making a copy of the icon and renaming that copy to include the "_opened" suffix:



Here's the result:


I hope this helps.

2018-06-14 12-24-08
Roberto Campos

Great Paulo! I included the "opened" icons and works perfectly.

Muito obrigado,

Roberto

2022-08-31 18-26-36
Easy Batch

Good Morning,

I want to know if is possible my screen to receive a notification of the Treewidget when the user click on the url-text (with a return parameter), instead goto a url link. I am using a url call for the same screen, but the effect not is good.

Best regards,

Roberto 

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.