Open feois opened 3 weeks ago
just use the same code for
ScrollContainer
This isn't necessarily as simple as that, and some more details on what you want the feature to do is good to add to a proposal
just use the same code for
ScrollContainer
This isn't necessarily as simple as that, and some more details on what you want the feature to do is good to add to a proposal
I read through a bit of ScrollContainer
and Tree
source code, it seems like it won't be impossibly hard with Tree::get_item_rect()
Tree
has a scroll_to_item
method, does it not work for your case?
Tree
has ascroll_to_item
method, does it not work for your case?
I didn't know that exists, sorry, however my proposal is still valid in that it can be a little bit more convenient.
Describe the project you are working on
An application that only uses GUI
Describe the problem or limitation you are having in your project
ScrollContainer
does not work withTree
andTree
does not have the ability to automatically follow the selectedTreeItem
Describe the feature / enhancement and how it helps to overcome the problem or limitation
Add an option to follow selected item for
Tree
similar toScrollContainer
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
Tree
will scroll to the selectedTreeItem
automaticallyIf this enhancement will not be used often, can it be worked around with a few lines of script?
AFAIK I think noEdit: After readingScrollContainer
andTree
source code, I now think yes, but still not something easy (as there is nothing in docs or internet about this) for newbie programmers like meYes, just connect
Tree.item_selected
toTree.scroll_to_item(Tree.get_selected())
Is there a reason why this should be core and not an add-on in the asset library?
Tree
is a core node