[Gambas-user] Need a good idea - a slider with two handles

Tobias Boege taboege at ...626...
Mon Apr 1 13:27:15 CEST 2013


On Mon, 01 Apr 2013, Bruce wrote:
> A user had a good idea and wants to know if we can build a form with
> sliders that control both the maxima and minima of various parameters.
> 
> I have attached a mocked up picture of the sort of thing that is
> required for a "squeeze" filter i.e. a low bandpass combined with a high
> band-limiter.  Similar things could be imagined for a "flange" type of
> filter.
> 
> There are some controls in Gimp, for example (in second attachment) that
> further show what is required.
> 
> I have made a couple of preliminary attempts to create a custom control
> in Gambas3 to do this but I am not getting very far.  The problems are:
> a) being able to detect which handle the user is trying to move and
> b) stopping the min handle from exceeding the max handle and v.v. 
> 
> Has anyone attempted this type of control (successfully)?
> Has anyone got any good ideas?

Sorry, I understood only half of what you said but the pictures hopefully
told the rest. I have a project here where a guy implemented a Slider on his
own to allow custom graphics in place of the handle. I never really read the
sources of that project nor do I think that it's well written but maybe it
can help you.

Since the "HorizontalFader" (what this means, I don't know), which is the
Slider, does not inherit the basic Slider itself but builds on UserControl
there will certainly be something in there that can give you at least a clue
about how to make one handle - and a second can't be too difficult then :-)

Regards,
Tobi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: SliderProgressbar-0.0.11.tar.gz
Type: application/octet-stream
Size: 32164 bytes
Desc: not available
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20130401/7a165de9/attachment.obj>


More information about the User mailing list