Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Report Control
  New Posts New Posts RSS Feed - [solved] HScrollbar may not be sized properly
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

[solved] HScrollbar may not be sized properly

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


Joined: 22 December 2008
Status: Offline
Points: 8
Post Options Post Options   Thanks (0) Thanks(0)   Quote DaveH Quote  Post ReplyReply Direct Link To This Post Topic: [solved] HScrollbar may not be sized properly
    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.

Inventory and Distribution Management for QuickBooks
Back to Top
mcmastl View Drop Down
Admin Group
Admin Group
Avatar

Joined: 14 April 2015
Status: Offline
Points: 79
Post Options Post Options   Thanks (0) Thanks(0)   Quote mcmastl Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
olebed View Drop Down
Admin Group
Admin Group


Joined: 01 July 2014
Location: Ukraine
Status: Offline
Points: 841
Post Options Post Options   Thanks (0) Thanks(0)   Quote olebed Quote  Post ReplyReply Direct Link To This Post 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
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.125 seconds.