tags:

views:

233

answers:

2
+1  A: 

Using a standard TScrollBox, it is technically possible to do some manual fiddling of its PageSize and Position properties while dragging its thumb around (ScrollCode=scTrack in its OnScroll event) to simulate the kind of UI that you showed in the ACID screenshot. The problem is that 1) you can't owner-draw a TScrollBar to add the drag lines, and 2) there is no direct way to determine which portion of the thumb the user is holding the mouse down on (the ends versus the middle). Unless you can come up with some fairly reliable calculations to figure out the pixel offsets of the left and right edges of the thumb based on the current Position and PageSize in relation to the overall client rectangle, then you are probably best off simply writing your own component instead, and then you can make it look and behave anyway you want.

Remy Lebeau - TeamB
Alright, thanks for the advice. It's strange that Delphi doesn't have anything like this, because setting numeric ranges is something I need to do all the time, in all sorts of applications...
Wouter van Nifterick
The kind of UI you are describing is not standard. That is why TScrollBox does not support it natively (because the underlying OS itself does not support it natively)
Remy Lebeau - TeamB
+4  A: 
lkessler
Cool, never saw that one before. Just downloaded it, and i'll be playing around with it.
Wouter van Nifterick
I've taken your advice by taking TMkRangeSlider and modifying it. It does exactly what I was looking for now. Thanks!
Wouter van Nifterick