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

Scroll RC Via Code

 Post Reply Post Reply
Author
Message
jpbro View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 January 2007
Status: Offline
Points: 1355
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpbro Quote  Post ReplyReply Direct Link To This Post Topic: Scroll RC Via Code
    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:

  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

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: 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....
Back to Top
mdoubson View Drop Down
Senior Member
Senior Member
Avatar

Joined: 17 November 2008
Status: Offline
Points: 1705
Post Options Post Options   Thanks (0) Thanks(0)   Quote mdoubson Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
jpbro View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 January 2007
Status: Offline
Points: 1355
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpbro Quote  Post ReplyReply Direct Link To This Post 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

Back to Top
mdoubson View Drop Down
Senior Member
Senior Member
Avatar

Joined: 17 November 2008
Status: Offline
Points: 1705
Post Options Post Options   Thanks (0) Thanks(0)   Quote mdoubson Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
Fabian View Drop Down
Senior Member
Senior Member
Avatar

Joined: 22 November 2004
Location: Switzerland
Status: Offline
Points: 336
Post Options Post Options   Thanks (0) Thanks(0)   Quote Fabian Quote  Post ReplyReply Direct Link To This Post 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).
 
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
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.188 seconds.