Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Report Control
  New Posts New Posts RSS Feed - How to intercept the scroll event?
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

How to intercept the scroll event?

 Post Reply Post Reply
Author
Message
energypf View Drop Down
Newbie
Newbie
Avatar

Joined: 13 October 2009
Location: Italy
Status: Offline
Points: 6
Post Options Post Options   Thanks (0) Thanks(0)   Quote energypf Quote  Post ReplyReply Direct Link To This Post Topic: How to intercept the scroll event?
    Posted: 24 May 2010 at 4:12am
Hello, I'd place an ActiveX control created by me in the cell control Control Report. Regarding the positioning there are problems, as using the event FocusChanging, I can place the control cell, but when I go to make the scroll control rightly does not move because no event is not generated. How do I set the control to move to the cell? There is some event to trap the event scrolluing? Thank you. I hope for your response.
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: 24 May 2010 at 11:32am
Hi,
 
I think you are better off, using just one event... The BeforeDrawRow event is THE event that covers most of what you are looking for. This event fires whenever ReportControl needs to be repainted. Clicking, scrolling, columnsizing, selecting row... etc etc etc  ...
 
 
 
Just set wndReportControl.SetCustomDraw xtpCustomBeforeDrawRow
 
Private Sub wndReportControl_BeforeDrawRow(ByVal Row As XtremeReportControl.IReportRow, ByVal Item As XtremeReportControl.IReportRecordItem, ByVal Metrics As XtremeReportControl.IReportRecordItemMetrics)
    
    'Your code goes here
    'For example:
    Dim l As Long
    Dim t As Long
    Dim r As Long
    Dim b As Long
    
    If Row.Record.Index = 1 And Item.Index = 1 Then
        'Get Row position and size
        Row.GetItemRect Item, l, t, r, b
        'stay on top
        YourOwnControl.ZOrder 0        
        'Position control on Record with index 1 and in second column (maybe you need to set a margin to get proper positioning)
        YourOwnControl.Move l * Screen.TwipsPerPixelX, t * Screen.TwipsPerPixelY, (r - l) * Screen.TwipsPerPixelX, (b - t) * Screen.TwipsPerPixelY 
    End If

End Sub
 
 
Now, try scrolling and column sizing, your control will stay on that position and with proper size 
 
 
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.152 seconds.