Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Report Control
  New Posts New Posts RSS Feed - Vertical Scroll Bug?
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Vertical Scroll Bug?

 Post Reply Post Reply
Author
Message
binkman71 View Drop Down
Newbie
Newbie


Joined: 22 July 2009
Status: Offline
Points: 5
Post Options Post Options   Thanks (0) Thanks(0)   Quote binkman71 Quote  Post ReplyReply Direct Link To This Post Topic: Vertical Scroll Bug?
    Posted: 18 January 2010 at 3:23pm
If you have a ReportControl narrow enough that only two rows are visible, and at that, the second is only partially visible (text leading off to another line or two below the window; might need a multiline text cell to accomplish this), if  the user clicks below the thumb tracker in the scroll bar no scrolling occurs.  I have debugged through this and found the issue to be in CXTPReportControl::GetReportAreaRows(...), which in this case always returns zero, so the position never updates.  The code starting at line 2576 (13.1) or line 2679 (13.2) of XTPReportControl.cpp has the following in the GetReportAreaRows method:
 
  if (top + rowHeight > m_rcReportArea.bottom)
   return bMoveDown ? i - nStartRow - 1 : nStartRow - i - 1;
 
I propose the following change, but figured I'd get input here first:
 
  if (top + rowHeight > m_rcReportArea.bottom)
  {
      if( i == (nStartRow+ 1) )
      {
          return i;
      }
      else
      {
          return bMoveDown ? i - nStartRow - 1 : nStartRow - i - 1;
      }
  }
 
This does seem to solve the case found in our use of the report control, but again, wanted to run it by here for other input.
 
Thanks,
 
K.
Back to Top
mdoubson View Drop Down
Senior Member
Senior Member
Avatar

Joined: 17 November 2008
Status: Offline
Points: 1705
Post Options Post Options   Thanks (0) Thanks(0)   Quote mdoubson Quote  Post ReplyReply Direct Link To This Post Posted: 19 January 2010 at 4:34pm
I can't reproduce you case - please open Issue and we can discuss it
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.141 seconds.