Solved

Question for BoRiS

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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Suggested Solutions

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…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

743 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now