Print Page | Close Window

Scroll RC Via Code

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=15161
Printed Date: 15 November 2024 at 6:51am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Scroll RC Via Code
Posted By: jpbro
Subject: Scroll RC Via Code
Date 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 - 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:

  1. Is there a way to move the RC scrollbar without changing the focus row?
  2. If not, can we have this ability so that we can control scrolling as we see fit? Maybe a ScrollBars object with Vertical and Horizontal sub-objects and then have LineUp/Down/Left/Right and PageUp/Down/Left/Right methods?
  3. Failing all of this, is there any way to interact with the RC scroll bar via API? I've tried Get/SetScrollPos (didn't work) and SendMessage(WM_Scroll) (didn't work). Any advice here?
Thanks in advance.


-------------
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3

Language: Visual Basic 6.0 SP6




Replies:
Posted By: Aaron
Date Posted: 14 September 2009 at 2:29pm
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....


Posted By: mdoubson
Date Posted: 14 September 2009 at 7:00pm
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 - https://forum.codejock.com/uploads/DemoVersion/ReportPaneViewTrackStaticMod.rar


-------------
Mark Doubson, Ph.D.


Posted By: jpbro
Date Posted: 16 September 2009 at 2:47pm
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



Posted By: mdoubson
Date Posted: 16 September 2009 at 2:53pm
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


-------------
Mark Doubson, Ph.D.


Posted By: Fabian
Date Posted: 17 September 2009 at 9:05am
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 - 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



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