I got a problem when I try to bind the desktop’s position x to the item’s transparent property.

I got a problem when I try to bind the desktop’s position x to the item’s transparent property.

Can anyone help me to make it correct?

]]>
(Next Post) »

5 Commentsto I got a problem when I try to bind the desktop’s position x to the item’s transparent property.

  1. Anonymous says:

    < ![CDATA[

    Where is transparency here ? You’ve set Label



    Or could you show the complete binding

    ]]>

  2. Anonymous says:

    < ![CDATA[

    You can only use as dynamic bindings the ones that lighting provides, the list is shown when tapping the + button in the binding alert.



    The container position is not one of those so you can’t (keep reading)



    The binding you wrote simply take the current position, it has no binding variables and so it won’t update automatically.



    There are two workarounds:


    Add in your binding the name of a variable that you know it changes (like $ll_second) so that the binding us updated every second. Not a good idea in this case.



    Another solution is to put a script in the position change event of the container, and change a variable there. Then simply use that variable in your binding and it will be updated. (Note, that event fires a lot of times, not sure if lightning will be able to keep up)




    To finish: my recommendation is to forget bindings and use a script instead and set it in the position change event. To change an item transparency just LL.getEvent().getContainer().getItemById(id).setVisibility(true); //(or getItemByLabel or getItemByName

    ]]>

  3. Anonymous says:

    < ![CDATA[

    TrianguloY really Do you mean visibility for transparency ?

    ]]>

  4. Anonymous says:

    < ![CDATA[

    Oh, right. My mistake. Thanks.



    LL.getEvent().getContainer().getItemById(id).getProperties().edit().setInteger(“i.alpha”,alpha).commit();

    ]]>

  5. Anonymous says:

    < ![CDATA[

    TrianguloY I got to know the key sense . Thanks for your reply.

    ]]>

Leave a Reply

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