Scroll RC Via Code |
Post Reply |
Author | |
jpbro
Senior Member Joined: 12 January 2007 Status: Offline Points: 1355 |
Post Options
Thanks(0)
Posted: 13 September 2009 at 12:45pm |
I'm working on a way to do auto-selection on mouse drag with the RC to see if I can help Fabian with his problem here (https://forum.codejock.com/forum_posts.asp?TID=15159).
So far, things are going okay but I need to be able to scroll the report control when the mouse is outside of the client area. I've tried using Navigator.MoveUp/Down methods, but they move the focus first which is undesirable. I also tried caching the focused row, calling Navigator.MoveFirstVisibleRow, then Navigator.MoveUp and restore the cached row, but this causes havoc with my selection (even with the SelectBlock and IgnoreSelection params set appropriately). So the questions are:
|
|
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3 Language: Visual Basic 6.0 SP6 |
|
Aaron
Senior Member Joined: 29 January 2008 Status: Offline Points: 2192 |
Post Options
Thanks(0)
|
Hi Jason
I don't know what you need this for...
I don't know if this is possible but you could get index of row in MouseMove event and
wndReportControl.Rows(rowUnderMouse.Index + 1).EnsureVisible
will scroll RC to that row and doesn't loose focus. |
|
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.... |
|
mdoubson
Senior Member Joined: 17 November 2008 Status: Offline Points: 1705 |
Post Options
Thanks(0)
|
I think that if you set your own scrollbar or scrollbars and attach to report
ReportControl.SetScrollBars(OLE_HANDLE hScrollBar, OLE_HANDLE vScrollBar)
you can get from YOUR scrollbars all data you need
e.g. I made horizontal scrollbar to follow fixed column set (including column resizing) - https://forum.codejock.com/uploads/DemoVersion/ReportPaneViewTrackStaticMod.rar |
|
jpbro
Senior Member Joined: 12 January 2007 Status: Offline Points: 1355 |
Post Options
Thanks(0)
|
Hi Aaron, that sounds like an acceptable solution, I'll give it a try, thanks.
Mark - I'm avoiding the SetScrollbars method because it is hacky, and there are known issues using that method with the RC Navigator class (or at least there were, IIRC you didn't think the problems were the RCs fault so they likely still exist). Unfortunately, I don't have time to find workarounds for those issues. |
|
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3 Language: Visual Basic 6.0 SP6 |
|
mdoubson
Senior Member Joined: 17 November 2008 Status: Offline Points: 1705 |
Post Options
Thanks(0)
|
May be but this is the only way to have Office-themed scrollbars - right?
And if you want to have scrollbar only under columns after you set FreezeColumnsCount and resize first columns - like in my app
|
|
Fabian
Senior Member Joined: 22 November 2004 Location: Switzerland Status: Offline Points: 336 |
Post Options
Thanks(0)
|
Hi Jpbro
Thanks for your effort but I have solved this since V12 (as you can see in https://forum.codejock.com/forum_posts.asp?TID=15159).
I was simply astound that I have to write code for such a basic behaviour and I was not shure if this feature was built in in one of the latest releases and I am missing a new property or method...
Thanks again for your help!
|
|
Product: Xtreme SuitePro (ActiveX) version 16.2.3
Platform: Windows 7 (32bit) Language: Visual Basic 6.0 / SP6 |
|
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 |