Solved

Question for BoRiS

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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
When I am typing into a TEdit last word repeats 7 145
Base1 Encode/Decode 3 81
How to build JSON File in Delphi 6 3 44
Drag & Drop... Data from one grid to another 2 40
This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

792 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