Advanced slider controls
Posted
#1
(In Topic #1260)
Regular

This beast has raised its head again this week. In fact it has grown even another head
in the intervening years and the use of the Draw features, has anyone come up with such a band filter control?
I asking before I commit myself to weeks of work learning how to build it or indeed whether it is possible nowadays.
tia
bruce
Posted
Regular

Code (gambas)
- .X = 20
- .Y = 20
- .W = 310
- .H = 20
- .Border = Border.Solid
- .H = DrawingArea1.H
- .X = 0
- .Y = 0
- .W = bt1.W
- .H = DrawingArea1.H
- .X = DrawingArea1.W - (DrawingArea1.W / 2)
- .Y = 0
- .W = bt1.W
- .H = DrawingArea1.H
- .X = DrawingArea1.W - .W
- .Y = 0
- With Paint
- .Brush = Paint.Color(Color.Green)
- .Rectangle(bt1.X + bt1.W, 0, (DrawingArea1.W - bt1.X) - (DrawingArea1.W - bt2.X), DrawingArea1.H)
- .Fill
- .Brush = Paint.Color(Color.Orange)
- .Rectangle(bt2.X + bt2.W, 0, (DrawingArea1.W - bt2.X) - (DrawingArea1.W - bt3.X), DrawingArea1.H)
- .Fill
- .End
- Case bt1.Id
- Case bt2.Id
- Case bt3.Id
- DrawingArea1.Refresh
Europaeus sum !
<COLOR color="#FF8000">Amare memorentes atque deflentes ad mortem silenter labimur.</COLOR>
<COLOR color="#FF8000">Amare memorentes atque deflentes ad mortem silenter labimur.</COLOR>
Posted
Guru

Sounds more like you want just a visual thing to show multiple levels.
Posted
Regular

&@BruceS
It does need to be an active control, not just for visualisation ("That would be too easy." said the requirements specifier)
b
Posted
Regular

Of course, for the "toaster" scenario, the usable life is typically a lot longer than the manufacturing period. The scenario where this two ranges is required is the "lightbulb" model. The commodity will be manufactured for as long as the production machinery is expected to last but the commodity has a usable lifetime that is much shorter. So the consumer has to keep buying replacements, so the manufacturer is overjoyed.
A colleague has just pointed out a third scenario involving "shelf life", for example a missile. Manufacturer only produces for a short time according to contract, the commodity sits around for a certain time before it rusts, the commodity itself has a usable life of about 4 minutes. Hmm, unless he can come up with another example, I think I'll just ignore this one as it would mean a slider with 4 buttons. Or even more…
1 guest and 0 members have just viewed this.



