This is a suggestion, but maybe there is currently a way to do this and I didn’t found it yet (If that’s the case…

This is a suggestion, but maybe there is currently a way to do this and I didn’t found it yet (If that’s the case tell me! )

An item.bringToView() function that will scroll/open/change all necessary containers so that the item is visible on the screen (more exactly ‘inside the screen view’, maybe it is behind something and you can’t see it but you get the idea)

Technically the effect I’m looking for is the same as when you click the pencil button of an item in the hierarchy menu, but without entering edit mode (but if it’s easier entering it I’m ok with it)

I know you can go to the desktop, open the necessary folders and scroll to the places where it needs to. But lightning already does this.

The effect I want is a script that, with the id of a item, can do ‘here you have that item’ and so the user can find items easily from script (as I said, like the hierarchy menu)

]]>
« (Previous Post)

One Commentto This is a suggestion, but maybe there is currently a way to do this and I didn’t found it yet (If that’s the case…

  1. Anonymous says:

    < ![CDATA[

    There is currently no public API for this, but you might be able to achieve this anyway because the feature is implemented internally for various purposes, and plugged on the focus change event. Try this::


    someItem.getRootView().requestFocus();


    or maybe this one, I am not sure (not tested)


    someItem.getRootView().getChildAt(0).requestFocus();


    I can add a cleaner API for this, since focus has obviously other goals and drawbacks. Also it won’t open intermediate containers.

    ]]>

Leave a Reply

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