Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6208947
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T05:53:44+00:00 2026-05-24T05:53:44+00:00

I just noticed while building a delphi 2010 application that the scrollbar is always

  • 0

I just noticed while building a delphi 2010 application that the scrollbar is always the same size when it shows up. The scroller in the middle of the bar is always the same size no matter how much there actually is to scroll. In contrast, most modern applications use scrollbars where the size of the scroller is proportional to the amount available to scroll, so that by looking it is clear how much there is to scroll through. Is there a way to change the scroll properties on my delphi controls, or would that require custom controls?

edit:
The component in this particular instance was a TDBGrid, which scrolled horizontally. I didn’t realize that windows was drawing these scrollbars. Perhaps Warren is correct and the question is unanswerable. Proportional scrollbars may not be ubiquitous on windows but I have yet to find a program on my windows machine that doesn’t use them. Even the delphi 2010 IDE uses them.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T05:53:45+00:00Added an answer on May 24, 2026 at 5:53 am

    This is how I do it in a custom component of mine (a simple text viewer):

    procedure TCustomViewer.UpdateScrollInfo;
    var
      ScrollInfo: TScrollInfo;
    begin
      with ScrollInfo do
      begin
        cbSize := SizeOf(ScrollInfo);
        fMask := SIF_POS or SIF_PAGE or SIF_RANGE or SIF_DISABLENOSCROLL;
        nMin := 0;
        nMax := 1023;
        nPage := PageWidth;
        nPos := FTopLeft.X;
      end;
      SetScrollInfo(Handle, SB_HORZ, ScrollInfo, True);
      with ScrollInfo do
      begin
        nMax := FLines.Count - 1;
        nPage := PageHeight;
        nPos := FTopLeft.Y;
      end;
      SetScrollInfo(Handle, SB_VERT, ScrollInfo, True);
      UpdateCaretPos;
      Update;
    end;
    

    IOW, you use a TScrollInfo, fill it up with the values you need to change, including nMax and nPage, and call SetScrollInfo with it, indicating the scroll bar you want to change. I’m sure that most controls with scroll bars control them internally, but if a control doesn’t, you could try SetScrollInfo. It might work for some of them. TScrollInfo and SetScrollInfo are defined in Windows.pas. Here is the MSDN link.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I just noticed while creating a RESTful WCF service that the Method parameter on
I've just noticed something that I'd never noticed before, while working on a (regular,
I just noticed while trying to learn to read GHC Core, that the automatically
I've just noticed that, while most of getters from a Bundle have the possibiliy
I'm finishing up my first site: http://www.audio-agent.com/ . I just noticed that, while it
I've noticed an issue while developing my pages that's always bothered me: while Firefox
I just noticed a strange behaviour while looking at my application in the Flash
while working on a project I accidentally noticed that the same method with only
Just noticed that the style of the navigation menu on windows.com is just what
I just noticed that the return list for results is limited to 1000. I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.