Change folder icon if folder is empty

cancel
Showing results for 
Search instead for 
Did you mean: 
suayb58
Active Member

Change folder icon if folder is empty

Hello,everyone. i want to change folder icon if  folder is empty.is there any information on this subject?is tihs possible?

1 Reply
jpotts
Professional

Re: Change folder icon if folder is empty

A folder does not know whether or not it is empty, it has to be checked. So you could do an evaluator/indicator as was suggested in your other post on this subject, but that evaluator/indicator would have to check whether or not the given folder has any children before deciding whether or not to display.

For a long list of folders this could get expensive.

Another option would be to write a behavior that keeps track of when a child is added/remove to/from a folder and then sets an isEmpty custom property on the folder accordingly. Then, the evaluator could just check that property without having to actually count its children.

The above indicator/evaluator approach is the "easy" way. If that's not good enough and you really want to change the folder icon in Share you'll have to do one of the above (either count the children or track isEmpty) and then also go through the joy of the associated Share customization to actually change the folder icon.