How can I scroll Up & Down, Right & Left in the Preview window using key strokes?
The following code will show you how to access the scrolling & paging functions of the FormGenWin component. procedure TForm1.FormKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState); const {Setting Keystroke constants} pgup=33; pgdn=34; pgend=35; pghome=36; arleft=37; arright=39; arup=38; ardown=40; begin Case key Of pgup: FormGenWin1.PrevPage; pgdn: FormGenWin1.NextPage; arleft: FormGenWin1.ScrollLeftPage; arRight: FormGenWin1.ScrollRightPage; arup: FormGenWin1.ScrollUpPage; arDown: FormGenWin1.ScrollDownPage; pgEnd: FormGenWin1.ScrollToBottom; pgHome: FormGenWin1.ScrollToTop; end; end; We can only guess that your next question would be about setting the amount of scroll that takes place when using the navigation keys or hiding the scrollbars when using the navigation keys. The HorzScrollBar & VertScrollBar properties were added in the 3.4 version, these properties give you full access to the scrollbars. There is no way to modify these settings in previous versions.
Related Questions
- For a key switch, do I use a single contact, or is there some sort of Left/Right switch required to test the ignition on both sides independently during run-up?
- Why do the characters I type using the Shift key appear on the right instead of the left?
- Do you use the [enterreset] key (left and right Ctrl keys) with Host On-Demand macros?