i create a shortcut with this lines and change icon visibility but the shortcut create but the icon still visible.
i create a shortcut with this lines and change icon visibility but the shortcut create but the icon still visible. I check the properties and seems to be correct (screenshot). If I manually check display the icon and again the icon disappear.
Suggestions?
var e = getEvent();
var c = e.getContainer();
var sh=c.addShortcut(“test”,Intent(),0,0);
sh.getProperties().edit().setBoolean(“s.iconVisibility”,false).commit();
]]>
< ![CDATA[
Gabriel Garcia I’m confused. Are you trying to make a visibility switch on and off for an object with a shortcut?
]]>
< ![CDATA[
No, I just want to change the visibilty of the icon to false, so the icon not show, but even changing to false the icon is still showing, I believe that is a refresh problem.
]]>
< ![CDATA[
OK, I got it. That’s odd I’ve never run in to that problem before.
]]>
< ![CDATA[
Try sh.setVisibility(false) to make a specific item invisible.
Or use c.getProperties instead of sh.getProperties as the property s.iconVisibility refers to the container and all its items, not a specific item.
]]>
< ![CDATA[
No, I just want this specific item not show the icon and label.
]]>
< ![CDATA[
Maybe it’s not an icon, but the content background? Try to change the icon, and see if it change anything (when icon visibility is true)
]]>
< ![CDATA[
I tried and get the same issue:
Like in the screenshots from Gabriel Garcia, the setting is correct but the visual is not. If I check then uncheck the icon visibility setting it works as expected, so the icon visibility setting from script is broken..
Pierre Hébert there is a bug here… somewhere…
]]>