How to intercept the scroll event? |
Post Reply |
Author | |
energypf
Newbie Joined: 13 October 2009 Location: Italy Status: Offline Points: 6 |
Post Options
Thanks(0)
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.
|
|
Aaron
Senior Member Joined: 29 January 2008 Status: Offline Points: 2192 |
Post Options
Thanks(0)
|
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.... |
|
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 |