Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Question for BoRiS

Posted on 1998-11-02
3
Medium Priority
?
204 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 800 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

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

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

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
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…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses

722 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