Print Page | Close Window

[solved] HScrollbar may not be sized properly

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=22340
Printed Date: 27 April 2024 at 8:47am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: [solved] HScrollbar may not be sized properly
Posted By: DaveH
Subject: [solved] HScrollbar may not be sized properly
Date Posted: 26 June 2014 at 4:13pm
Hi, it seems that if a report control column's width is changed through code, the viewport size for the horizontal scrollbar may not get recomputed. For example, if the control is wide enough to show the initial column widths without scrolling, there's no scrollbar, as expected. Then if you increase the Width property of one of the columns, the scrollbar should appear, but it doesn't. If you then click on the column header divider, as if you were going to resize a column with the mouse (but you don't actually have to resize it), the scrollbar will appear properly. Or if there is initially a horizontal scrollbar and you widen a column, the scrollbar won't scroll far enough to the right to completely show all the columns. And again, if you click on the column divider, the scrollbar will adjust and let you scroll all the way.

Sample code to demonstrate the problem... in VB6, put a Report control named ReportControl1 on the form, then paste this as the form code:

Option Explicit

Private Sub Form_Load()
  Dim r As ReportRecord
 
  With ReportControl1
    .Width = 250 * Screen.TwipsPerPixelX
    .AutoColumnSizing = False
    Set r = .AddRecord
    r.AddItem "Value for column 1"
    r.AddItem "Value for column 2"
    .Populate
   
    .Columns.Add 0, "Column 1", 100, True
    .Columns.Add 1, "Column 2", 100, True
    .Columns(0).Width = 200
    ' Uncommenting the .Redraw will cause the scrollbar to appear properly
    '.Redraw
  End With
End Sub


You should see a report control with no horizontal scrollbar, and with Column 2 truncated. Then when you click the column divider, the scrollbar will appear. Calling Redraw after setting the column width will work around the problem, but I didn't expect it to be necessary to do so.

This is with version 16.3.1.


-------------
SuitePro version 16.3.1

David Huang
Alterity, Inc.

http://www.acctivate.com" rel="nofollow - Inventory and Distribution Management for QuickBooks



Replies:
Posted By: mcmastl
Date Posted: 20 April 2015 at 12:35pm
David Huang,
Thank you for letting us know of this issue.  We have let our development team know to look further into the issue.  If the matter has been resolved please let us know. 


-------------
Luke McMasters, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: olebed
Date Posted: 21 July 2015 at 6:50am
Hello David,

This issue has already been solved. The fix is already available in version 17.0 beta1. Once you have an update installed, please make sure everything works as  expected, let me know if there are any issues left.

- AdjustLayout() and RedrawControl() added to CXTPReportPaintManager::SetFixedRowHeight()
- AdjustLayout() added to CXTPReportHeader::ResizeColumn()
- CXTPReportPaintManager::CalcColumnHeight used old value of width of ReportHeader because pHeader->AdjustColumnsWidth() (in CXTPReportControl::AdjustLayout()) was called before updating width of ReportHeader. The same bug was fixed in TrackControl.

Regards,
 Oleksandr Lebed



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