I want to add a icon to a vi below,a green mark at topleft.
Now,I had add it and set a persist property called mark which valued 1.
But there's something wrong with it.When i restrat labview and open the project,the green mark not displayed.
The persist property can not be founded.Otherwise this VI is in a LVClass.
If i marked a vi not in LVClass,the green mark displayed.Why?
Is there some necessary property need add to the VI or LVClass?
Is there anyone has the same problem,and had solved?
Can someone known how to deal with it?
To confirm I understood your problem correctly, can you confirm this is the issue you are seeing? -
The overlay icon that you saved on a VI is not visible on project load time when the VI is in a LVClass but if the same VI is outside of the class the overlay icon is displayed on project load.
1. Do you see this behavior when a VI is in a lvlib? I think I had seen a similar bug a while back, where a property doesn't persist when added to an item under a library but does persist when directly added under a project.I don't remember all the details of this but can try to find out if this is what you are witnessing.
2. Have you checked the Item_Init and Item_OnCommand VIs in your provider, to make sure you don't have any logic in there preventing you from adding icon overlays to VIs inside a container?
Hope this helps,
Thanks for your answer!
First,you are right.
Second,I did not add it in a lvlib,i will try it.
We all clear that the access scope(private,ptotected) icon which set to the VI can be displayed on project load time.
I had checked for several times,in Item_OnCommand add icon and set persist property rightly.
When project loaded,persist property can not be founded in Item_Init,so the overlay icon not be added.