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.
This is how I do it in a custom component of mine (a simple text viewer):
IOW, you use a
TScrollInfo, fill it up with the values you need to change, includingnMaxandnPage, and callSetScrollInfowith 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 trySetScrollInfo. It might work for some of them.TScrollInfoandSetScrollInfoare defined inWindows.pas. Here is the MSDN link.