Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Report Control
  New Posts New Posts RSS Feed - Default scroll in populate
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Default scroll in populate

 Post Reply Post Reply
Author
Message
jw_statica View Drop Down
Groupie
Groupie


Joined: 23 May 2018
Status: Offline
Points: 23
Post Options Post Options   Thanks (0) Thanks(0)   Quote jw_statica Quote  Post ReplyReply Direct Link To This Post Topic: Default scroll in populate
    Posted: 14 March 2023 at 7:15am
Can you add a parameter that will disable the default functionality of setting the scroll at the beginning
list of items, when we don't have an item focused in the list? This setting is done in "Populate" operation in CXTPReportControl.

Problematic code in CXTPReportControl (In XTPGridControl is the same):
void CXTPReportControl::Populate()
{
...
if (GetRows()->m_nFocusedRow == -1) { SetTopRow(0); if (GetRows()->GetCount() > 0) { GetRows()->m_nFocusedRow = 0;
... } } else { EnsureVisible(GetFocusedRow()); }

In our application, parent pane window set empty focus (SetFocusRow(nullptr)) in ReportControl on OnKillFocus action.
That results the list always scroll to the beginning.
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.156 seconds.