AV when scrolling mouse in XE2
Hi
I'm busy porting my app from Delphi 2009 to XE2. I'm using the following
code to scroll the mouse-wheel in TppViewer:
ReportViewer.ScrollBox.VertScrollBar.Position :=
ReportViewer.ScrollBox.VertScrollBar.Position - (WheelDelta div 5);
The above code worked perfectly with Delphi 2009 but i'm getting an AV in
XE2 as soon as I use the wheel to scroll.
I'm using the latest version of Reportbuilder and Delphi XE2 (Update 3).
I'm busy porting my app from Delphi 2009 to XE2. I'm using the following
code to scroll the mouse-wheel in TppViewer:
ReportViewer.ScrollBox.VertScrollBar.Position :=
ReportViewer.ScrollBox.VertScrollBar.Position - (WheelDelta div 5);
The above code worked perfectly with Delphi 2009 but i'm getting an AV in
XE2 as soon as I use the wheel to scroll.
I'm using the latest version of Reportbuilder and Delphi XE2 (Update 3).
This discussion has been closed.
Comments
be used to scroll through the pages, the pages are generated in a background
thread.
One option is to modify your code to call Viewer.VerticalScroll like this...
Viewer.VerticalScroll(WheelDelta div 5);
Another option is to set Report.PreviewFormSettings.SinglePageOnly to True,
and then the old single page preview is used. This will preserve your old
code.
-
Nard Moseley
Digital Metaphors
www.digital-metaphors.com
Best regards,
Nard Moseley
Digital Metaphors
www.digital-metaphors.com