Skip to content

Feature request: expose ListBox::ScrollIntoView (or a ScrollViewer scroll setter) on the Noesis UI object model #584

Description

@Shiney1965

The Lua Noesis object model currently exposes property get/set, tree traversal (Find,
Child, VisualChild), event subscription, and command execution — but no way to
programmatically scroll a ScrollViewer/ListBox. I'd like to request one small addition:
ListBox::ScrollIntoView(item) (ideal), or alternatively a working scroll-offset setter on
ScrollViewer.

Use case:

My mod (CCNS — "CC Hair & Head Search", a character-creation QoL mod) https://github.com/Shiney1965/BG3-CC-Mod-Head-and-Hair
adds a search panel for the CC hair/head pickers. Applying a search result works assigning SelectedHair /
SelectedHead on the CC view-model), and the selection highlight renders — but the hair or head selection grid cannot be scrolled to the selected tile, so users must locate it manually in grids that are 40,000+ px
tall with 1,000+ modded entries. The mod already has the exact ListBoxItem container in hand;
the only missing piece is the scroll call.

What I verified doesn't work (SE v31, Patch 8, in-game)

  • ScrollViewer.VerticalOffset (via Lua property write):** the write is accepted and reads
    back, but the view never moves, and the engine overwrites the value on the next real scroll —
    it behaves as an output-only reflection of internal scroll state.
  • ls::LSScrollViewer.ScrollToElement (Larian's own scroll-to-element property, via Lua
    property write):** accepted, no effect in the keyboard CC UI.
  • The same two properties set from XAML** (a b:ChangePropertyAction in a DataTemplate
    trigger, i.e. through Noesis's own SetValue path — delivery verified by also writing a marker
    value to the same target object and reading it back from Lua): marker lands, still no scroll.
    Its only usage in shipped game XAML is a controller file (PreloadedActionRadials_c.xaml,
    bound to gamepad FocusedElement), so it may be gamepad-focus-only machinery.
  • There is no ScrollIntoView / BringIntoView / Focus / ScrollToVerticalOffset in the
    exposed method map (BG3Extender/GameDefinitions/PropertyMaps/UI.inl), and no occurrence of
    ScrollIntoView anywhere in the repo.

So as far as I can tell, real user input (wheel / scrollbar / gamepad focus) is currently the only thing that can scroll these panels, and no Lua- or XAML-reachable channel works.

Proposed API (any one of these would solve it)

  1. listBox:ScrollIntoView(item) — item as index, VM object, or ListBoxItem; maps to
    Noesis::ListBox::ScrollIntoView.
  2. element:BringIntoView() on FrameworkElement (raises RequestBringIntoView, lets the
    nearest ScrollViewer handle it) — more general.
  3. scrollViewer:ScrollToVerticalOffset(number) / ScrollToHorizontalOffset(number).

Thanks for SE — the rest of the mod (live VM reads, selection apply, loca-based labels) is built
entirely on it and works great.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions