Nova.Scroller - needs Easy concept of "float ScrollPosition { get; set; }". #334
najak3d
started this conversation in
Feature Requests
Replies: 1 comment
-
If you are interested in including my TreeView, Nested Menus, or DeepSelector concept into Nova -- I'll let you have it for full re-use for free. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
In our turn-based Civ Game, we have a long Tree View which the user may drill into. For my TreeView (built on NovaUI), I am restoring the Expansion state of each node, to preserve this after the Tree Content is fully Rebuilt. However, the Scroller Position ALSO needs to be restored. Your current Scroller doesn't make this easy (or clear).
To make this work, I created "ScrollPosition" property as follows:
Then I was able to read then restore my Scroll bar position after the full rebuild of content, like this:
Note that here "ExecuteAfterNextUpdate()" is required to allow time for the Content Layout to complete, before I set the Scrollbar position.
NOTE -- It would be nice if this delay wasn't necessary either. Your Scroller should be smart enough to recognize that content was just redefined. In short, I'd like to avoid the "flicker" where the first frame shows it at Scroll "0" before it restores the correct value.
SPECIAL NOTE! - Thanks to you providing source code, I was able to debug and fix this myself in about 15 minutes!! Thank you for loving (and trusting) your users.
Here's a video showing the Flicker each time I advance to Next Turn which rebuilds the TreeView:
(note here the Scroll bar itself is flickering in size - getting shorter, then taller)
NovaUI-Defect-ScrollPositionFlicker.mp4
So in short - the request here is three-fold:
IDEA:
If that ends up being the only viable solution, then #2 and #3 above are moot. I am only asking for a way to Restore Scroll Position in clear fashion, without modifying your Scroller class.
Beta Was this translation helpful? Give feedback.
All reactions