Closed JordanMartinez closed 8 years ago
Do the nodes in the ScrollPane
have any correspondence to items in the VirtualFlow
(assuming that the VirtualizedScrollPane
contains a VirtualFlow
). If so, I would bring the VirtualFlow
's item to the viewport using VirtualFlow.showAsFirst(itemIndex)
and let the ScrollPane
adjust automatically.
Yes and no :-D
ScrollPane {
HBox {
LeafPane { // these Nodes match up with each line in StyledTextArea
Node
Nodes...
}
ParentPane { // these Nodes are unpredictable in their layout
Node
Nodes...
}
Higher ParentPanes and and their Nodes {} // unpredictable in their layout
}
}
So, such a thing would work for the Nodes in the LeafPane but not for any in the ParentPanes
Well, then it doesn't seem to be Flowless related. I don't know why your approach would not work. You can convert coordinates relative to a node to coordinates relative to its parent with the localToParent method. You will need to use it multiple times for deeper hierarchies.
Ok, I guess I'll have to play around it with some more.
I've asked this on StackOverflow, since that seems like the place to have that discussion. However, I am also opening an issue here because I think you, @TomasMikula , would probably be one of the few who could answer this specific question.