TAdvRangeSlider...

Hello,

Which help PDF file covers TAdvRangeSlider?
Property descriptions is what I am seeking.

Thanks,

Mark

Hello Mark,


Did you already check the demo appliation for the 'AdvRangeSlider'?
This should give you an overview of the use of the properties, another project that might help is the 'AdvTrackBar'.
Unfortunately, there is no documentation on the TAdvRangeSlider.
In case there are still properties that aren't clear, please just ask about them.

Thanks for the response.

> Did you already check the demo appliation for the 'AdvRangeSlider'?

> ...another project that might help is the 'AdvTrackBar'.

 I just looked at both demos. Zero help in defining which property alters the slider/track bar.

 >Unfortunately, there is no documentation on the TAdvRangeSlider.

 That is really a shame.

 >In case there are still properties that aren't clear, please just ask about them.

 Or perhaps it could be documented.

We are looking into a better way to document everything, but because of the huge load of components, this takes a very long time. And as we still want to bring new components and new features to our customers as well, this makes it even longer.
In the pdf files you can already find information on a lot of components, unfortunately TAdvRangeSlider is not one of them.

But as I mentioned before, I would love to help you with any questions regarding the properties.
The Trackbar can be altered with the Slider property and for the thumbs, you have the ThumbLeft and ThumbRight property to configure them to your liking. With the Tickmark property you can set the indents and text on your track bar/ range slider. And with Orientation you can change the AdvRangeSlider to a horizontal or vertical layout.

>We are looking into a better way to document everything...

Perhaps the simple approach; “If not documented, not released.”.

Unless I am mistaken, the slider does not support floating point.

Thumb positions in the range slider are indeed set via integer properties. 



Thanks for the response.
Rules out many uses for the slider.

I cannot see any reason for this.
A screen is displayed on integer pixel coordinates, hence, that is the level on which you can control the thumb position on the screen. 
If you want to use this to manage a float value change with it, it is a simple recalculation of (position/max-min)*range to get to your desired floating point value.



OK I’ll bite. Below is a capture of a slider control I modified to easily work with floats. It is a common range used by customers. How do I accomplish with your slider? No calculations to do. Enter min/man, in float point, and use the control. You can of course alter the tick marks/scale text.


I can send you the source.

Or the customer that needed:


With TAdvRangeSlider, set AdvRangeSlider.TickMark.ShowText = true, AdvRangeSlider.TickMark.ShowTextAtSteps = 1
and write the code:

procedure TForm1.AdvRangeSlider1GetTickMarkText(Sender: TObject; Index: Integer;
  var value: string);
begin
  Value := Format('%0.1f', [2*(index - 5)/10]);
end;

or for your 2nd case:

procedure TForm1.AdvRangeSlider1GetTickMarkText(Sender: TObject; Index: Integer;
  var value: string);
begin
  Value := Format('%0.1f', [index/10]);
end;

Thanks for the response.

While it hard codes the values for this example, my customers set the min/max values, tick mark frequency, decimal count, etc.
The scale could be -0.13 to 1.9, with 12 steps.
Hard coding is not workable.

I guess I could make a slider inherited from your slider. It is so much easier to make the slider floating point from the start and round/trunc as needed for use with integer values.