Print Page | Close Window

Vertical Scroll Bug?

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Report Control
Forum Description: Topics Related to Codejock Report Control
URL: http://forum.codejock.com/forum_posts.asp?TID=16035
Printed Date: 19 May 2024 at 5:40am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Vertical Scroll Bug?
Posted By: binkman71
Subject: Vertical Scroll Bug?
Date 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.



Replies:
Posted By: mdoubson
Date Posted: 19 January 2010 at 4:34pm
I can't reproduce you case - please open Issue and we can discuss it

-------------
Mark Doubson, Ph.D.



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net