Project

General

Profile

Actions

Feature #13785

open

WTableView::scrollTo: Take column into account

Added by Michael Seibt 12 days ago. Updated 12 days ago.

Status:
New
Priority:
High
Assignee:
-
Target version:
-
Start date:
06/19/2025
Due date:
% Done:

0%

Estimated time:

Description

As the documentation of Wt 4.11.4 admits (https://www.webtoolkit.eu/wt/doc/reference/html/classWt_1_1WTableView.html#a093b661f93551c1d6f73c423ae8ef459),
the current implementation of WTableView::scrollTo(WModelIndex& index) does not take index.column() into account.
We are porting a desktop application having wide tables. Single cell selection must work using arrow keys.
We have implemented this by handling signals keyWentDown and selectionChanged calling scrollTo.
As documented, WTableView::scrollTo(WModelIndex&) does not scroll horizontally.
WTableView::scrollTo(int x, int y) with x = /*magic number from WTableView.C*/ 7 + sum of column widths to the left and y = -1 is a workaround.
But it scrolls for every movement which results in a terrible UX.
The necessary information "which cells are visible in the browser" is available in WTableView, but inaccessible because all private.
I.e. WTableView itself needs to be modified.

Actions #1

Updated by Michael Seibt 12 days ago

Please do not duplicate the flaws of vertical scrolling as reported in #13786.

Actions

Also available in: Atom PDF