Solved

Question for BoRiS

Posted on 1998-11-02
3
201 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

Technology Partners: 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

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
In this video, viewers will be given step by step instructions on adjusting mouse, pointer and cursor visibility in Microsoft Windows 10. The video seeks to educate those who are struggling with the new Windows 10 Graphical User Interface. Change Cu…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
Suggested Courses
Course of the Month8 days, 23 hours left to enroll

615 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