RangeSlider example
copy linkIntroduction
In this article we'll see how to integrate a RangeSlider type component into the RD3 graphics engine without using external libraries.
We want to obtain this result:
Attached you can also find the example project for the FLUID graphics engine.

Definition in the IDE
First, in the project we created a client library called RangeSlider and defined the properties, methods, and events:

The BackColor property is used to set the object color. In this example we will change it based on the value of the field.
The RawValue property is used to read the actual value of the slider.
The Step property is used to set the granularity of the value.
The OnEvent event is fired server side when the value of the field changes.
Then, a form was created with an in-list panel onto which we dragged the client library.
The tooltip and the color of the slider are set in the OnDynamicProperties event based on the value selected.

Client-side wrapper class
In the custom directory a JavaScript file, RangeSlider.js, was created containing our code and a CSS file, range-slider.css with just 3 CSS classes.
Note: We did not change the Desktop.htm and Desktop_sm.htm files, because the RangeSlider.js file is loaded automatically, while the range-slider.css file is loaded when the JavaScript for the RangeSlider class is loaded.


Loading the CSS
The LoadRequirements static method of the CustomElement class is used to load the CSS.

Creating the component
The Realize method was defined, in which the element is built completely manually (no third-party components are used).




Changed on: 17/11/2023 / From version: 21.0.8100