Scrollbars |
Post Reply |
Author | |
oddi
Newbie Joined: 20 November 2006 Status: Offline Points: 7 |
Post Options
Thanks(0)
Posted: 07 November 2008 at 3:55am |
Is there a way to know when the scrollbar hits bottom.
What i am trying to do is this. I attached a codejock scrollbar to the reportcontrol and lets say i load 100 records to the reportcontrol i want to add the next buffer (100) when the scrollbar hits bottom, the thing is that the value scrollbar max value changes all the time when reportcontrol is resized. Hope this makes any sense. Regards |
|
Oddi,
Product: Xtreme SuitePro (ActiveX) version 11.2.1 Platform: Windows XP (32bit) - SP 2 Language: Visual Basic 6.0 |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hi,
Do you use SetScrollBars method to attach it ?
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
oddi
Newbie Joined: 20 November 2006 Status: Offline Points: 7 |
Post Options
Thanks(0)
|
Yes.
|
|
Oddi,
Product: Xtreme SuitePro (ActiveX) version 11.2.1 Platform: Windows XP (32bit) - SP 2 Language: Visual Basic 6.0 |
|
Aaron
Senior Member Joined: 29 January 2008 Status: Offline Points: 2192 |
Post Options
Thanks(0)
|
Hi,
Value of VerticalScroll will always be number of rows MINUS number of visible rows. To determine how many rows are in the visible portion of RC:
Dim firstRow As Long
Dim lastRow As Long Dim numberOfVisibleRows as long
wndReportControl.Navigator.MoveFirstVisibleRow firstRow = wndReportControl.FocusedRow.Index wndReportControl.Navigator.MoveLastVisibleRow lastRow = wndReportControl.FocusedRow.Index So:
numberOfVisibleRows = lastRow - firstrow
So:
If wndReportControlData.Rows.Count = (VScroll.Value + 1) + numberOfVisibleRows Then "Do Something"
Note: VScroll.Value is zero based, that's why +1
|
|
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2 Language: Visual Basic 6.0 Zero replies is not an option.... |
|
oddi
Newbie Joined: 20 November 2006 Status: Offline Points: 7 |
Post Options
Thanks(0)
|
Thanx alot Aaron.
Helps me a lot |
|
Oddi,
Product: Xtreme SuitePro (ActiveX) version 11.2.1 Platform: Windows XP (32bit) - SP 2 Language: Visual Basic 6.0 |
|
oddi
Newbie Joined: 20 November 2006 Status: Offline Points: 7 |
Post Options
Thanks(0)
|
One more try and bare with me on this, i am quite new to these controls.
The code you showed me works perfectly with the scrollbar, i can load next buffer to grid when scrollbar hits bottom . But how about when i scroll the grid with the mouse or page down, the report control does not fire the scrollbar change event. Aaron i am sure you know a trick or two to guide me on the right track regarding this issue. Again thanks for all the support. Regards, |
|
Oddi,
Product: Xtreme SuitePro (ActiveX) version 11.2.1 Platform: Windows XP (32bit) - SP 2 Language: Visual Basic 6.0 |
|
Aaron
Senior Member Joined: 29 January 2008 Status: Offline Points: 2192 |
Post Options
Thanks(0)
|
Hi,
The hat is empty (no tricks in it...)
Maybe you need to approach this another way. FocusChange event of RC is fired when using arrow / page-up / page-down keys.
You could use this FocusChange event to determine if last row is selected:
If wndReportControl.Rows.Count = NewRow.Index + 1 Then "Do Something"
If you would use wndReportControl.Navigator.MoveLastVisibleRow in VScroll_Change event the FocusChange event will be fired everytime the user clicks on scrollbar buttons. But this doesn't work correct, CJ developers. Only when scrolling to the top works correct. Scrolling down it doesn't select last visible row
|
|
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2 Language: Visual Basic 6.0 Zero replies is not an option.... |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |