Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Report Control
  New Posts New Posts RSS Feed - Scrollbars
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Scrollbars

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


Joined: 20 November 2006
Status: Offline
Points: 7
Post Options Post Options   Thanks (0) Thanks(0)   Quote oddi Quote  Post ReplyReply Direct Link To This Post Topic: Scrollbars
    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
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 07 November 2008 at 5:17am
Hi,
 
Do you use SetScrollBars method to attach it ?
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
oddi View Drop Down
Newbie
Newbie


Joined: 20 November 2006
Status: Offline
Points: 7
Post Options Post Options   Thanks (0) Thanks(0)   Quote oddi Quote  Post ReplyReply Direct Link To This Post Posted: 07 November 2008 at 5:18am
Yes.
Oddi,
Product: Xtreme SuitePro (ActiveX) version 11.2.1
     Platform: Windows XP (32bit) - SP 2
     Language: Visual Basic 6.0
Back to Top
Aaron View Drop Down
Senior Member
Senior Member
Avatar

Joined: 29 January 2008
Status: Offline
Points: 2192
Post Options Post Options   Thanks (0) Thanks(0)   Quote Aaron Quote  Post ReplyReply Direct Link To This Post Posted: 07 November 2008 at 7:58am
Originally posted by oddi oddi wrote:

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
 
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....
Back to Top
oddi View Drop Down
Newbie
Newbie


Joined: 20 November 2006
Status: Offline
Points: 7
Post Options Post Options   Thanks (0) Thanks(0)   Quote oddi Quote  Post ReplyReply Direct Link To This Post Posted: 07 November 2008 at 8:48am
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
Back to Top
oddi View Drop Down
Newbie
Newbie


Joined: 20 November 2006
Status: Offline
Points: 7
Post Options Post Options   Thanks (0) Thanks(0)   Quote oddi Quote  Post ReplyReply Direct Link To This Post Posted: 19 November 2008 at 7:30am
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
Back to Top
Aaron View Drop Down
Senior Member
Senior Member
Avatar

Joined: 29 January 2008
Status: Offline
Points: 2192
Post Options Post Options   Thanks (0) Thanks(0)   Quote Aaron Quote  Post ReplyReply Direct Link To This Post Posted: 20 November 2008 at 10:49am
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....
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.