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();

]]>
(Next Post) »

7 Commentsto i create a shortcut with this lines and change icon visibility but the shortcut create but the icon still visible.

  1. Anonymous says:

    < ![CDATA[

    Gabriel Garcia​ I’m confused. Are you trying to make a visibility switch on and off for an object with a shortcut?

    ]]>

  2. Anonymous says:

    < ![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.

    ]]>

  3. Anonymous says:

    < ![CDATA[

    OK, I got it. That’s odd I’ve never run in to that problem before.

    ]]>

  4. Anonymous says:

    < ![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.

    ]]>

  5. Anonymous says:

    < ![CDATA[

    No, I just want this specific item not show the icon and label.

    ]]>

  6. Anonymous says:

    < ![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)

    ]]>

  7. Anonymous says:

    < ![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…

    ]]>

Leave a Reply

Your email address will not be published. Required fields are marked *