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

Bruce bbruen at ...2308...
Fri Apr 5 13:54:39 CEST 2013


On Tue, 2013-04-02 at 12:38 +0200, Fabien Bodard wrote:
> You need to use a usercontrol and a drawing area.  Then withvthe draw class
> all becomebpossible
> Le 1 avr. 2013 13:30, "Tobias Boege" <taboege at ...626...> a écrit :
> 
> > 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


Thanks to both of you.  I haven't got much further on this but there
seems to be some good ideas to follow up.  I have some "work pressure"
going on, so it may be some time before I can take this up again.

But.... "I'll be back".

regards
Bruce






More information about the User mailing list