Using master sliders and child sliders
It is possible that your application will use some quantity that can be further decomposed into smaller values. Additionally, the user may need to control these smaller values and not just the aggregate. If we decide to use the slider widget for this purpose, we can think of the child sliders observing the changing value of the master slider. Let's take a look at how we might go about implementing such a group of sliders. We'll design an interface that allows us to allocate how much of the CPU this application is allowed to use. This is the master slider. We'll assume a quad-core architecture, and so we'll have four subsequent sliders that depend on, and observe, the main CPU slider.
How to do it...
Here is the HTML used to define the layout of our five sliders. Each slider has its own div
container, mainly used to define widths and margins. Inside the div
container, we have a label of each CPU, their current MHz allotment, and the maximum. This is where...