scrolling in preview withour mouse
I want to give the user the possibility to scroll in the preview by
using the cursor up and down keys. How could I implement this?
There is no onkeaydown in the viewer. Even if I try to do it in the
onkeydown of the form, it doesn't work, for the onkeydown doesn't fire
if you press the cursor keys.
Any sugestions?
cu
Helmut
using the cursor up and down keys. How could I implement this?
There is no onkeaydown in the viewer. Even if I try to do it in the
onkeydown of the form, it doesn't work, for the onkeydown doesn't fire
if you press the cursor keys.
Any sugestions?
cu
Helmut
This discussion has been closed.
Comments
ReportBuilder 7.04 Build 2 offers scrolling with the mouse wheel and the
arrow keys. Be sure you are using the latest build of RB 7.04 if you have
this version. As far as I know the arrow keys have always worked in the
Preview window in past versions of ReportBuilder 7.
--
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
The TppViewer descends from TCustomPanel which in turn descends from
TWinControl. The OnKeyDown and OnKeyPress events are protected in this
class. You will need to create a TppViewer descendent that declares this
event as public or published to gain access.
--
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
I created an example and was able to capture every key stroke except for the
arrow keys. This leaves me at a loss as the Delphi Help for the OnKeyDown
event clearly states that it should be used for "all keystrokes" as opposed
to the OnKeyPress event which is just used for characters. This seems to be
a Delphi issue so a quick search on Google Groups revealed numerous
solutions. I'll let you pick the right solution for your needs. Apparently
the arrows are "system" keys and are best handled in Application.OnMessage
event. Override this event may and using the WM_KEYDOWN message may work
for your needs.
--
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com