Project

General

Profile

Scroll position reset after updating objects in WTable

Added by Martin Melcher 4 months ago

Hello,

I am displaying the following object hierarchy:

  • WContainerWidget (view window)
    • WVBoxLayout
    • Menu bar (WContainerWidget)
    • Table container (WContainerWidget) with scrollbars activated through TableContainer->setOverflow(Wt::Overflow::Auto,Wt::Orientation::Vertical); TableContainer->setOverflow(Wt::Overflow::Auto,Wt::Orientation::Horizontal);
      • WTable which can contain multiples of the following:
        • WSlider
        • WText
        • WLineEdit
        • WCartesianChart

When the table contents are updated through one of the following:
WSlider::setValue
WText::setText
WCartesianChart::setSeries

I find that the scroll position of the view is reset (moved to top or bottom)
How can I make the updates listed below while preserving the scroll position of the view?

Regards,

Martin