Solved

Question for BoRiS

Posted on 1998-11-02
3
200 Views
Last Modified: 2010-04-06
BoRiS

I know you answered this question for me a while ago on the delphi forums but can not remember the answer you gave me.

The question was how to scroll a scroll box using pgup pgdown for vertical and for horizontal the home, end keys.

Please help as this is urgent, I rally need this now¿

Bye
Rouge
0
Comment
Question by:rouge
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 8

Expert Comment

by:ZifNab
ID: 1345404
parding me for entering this thread.

use these  

SENDMESSAGE(scrollbox1.handle,wm_vscroll,{parameter},0);

{parameter}
 SB_PAGEDOWN
 SB_PAGEUP
 SB_TOP
 SB_BOTTOM
 SB_LINEDOWN
 SB_LINEUP

or use the TScrollbox.ScrollBy(..,..);

Zif.
0
 
LVL 4

Accepted Solution

by:
BoRiS earned 200 total points
ID: 1345405
rouge

Hmmm...I don't remember the question but here is a simple way to do it...

procedure TForm1.FormKeyDown(Sender: TObject; var Key: Word;
  Shift: TShiftState);
const
  Jump = 10;
begin
  with ScrollBox1.VertScrollbar do
    if Key = VK_NEXT then
      Position := Position + Jump
    else if Key = VK_PRIOR then
      Position := Position - Jump;
       with ScrollBox1.HorzScrollbar do
        if Key = VK_HOME then
         Position := Position + Jump
        else if
         Key = VK_END then
          Position := Position - Jump;
end;

this will also work for anything that has scrollbars just change the scrollbox1 to the control that requires the scrolling...

Also ZifNab's meathods work just aswell (as always) :-)

Later
BoRiS
0
 

Author Comment

by:rouge
ID: 1345406
Thank you BoRiS this is just what I need.  Zifnab thank you for the information and help.

I think I should come here more often seems like a good place for help, this is my first time here and I already like it.

Thank you once again.

Bye
rouge
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

710 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question