[Gambas-user] Slider mousewheel event

Benoît Minisini gambas at ...1...
Mon Jan 7 13:04:02 CET 2013


Le 07/01/2013 05:37, Bruce a écrit :
> Hi all,
>
> I am trying to get the new value of a slider control when the user spins
> the mousewheel over it.
>
>          Public Sub InnerSlider_MouseWheel()
>
>            Debug $innerslider.Value
>            Wait
>            Debug $innerslider.Value
>            $innervaluebox.Text = $innerslider.Value
>
>          End
>
> InnerSlider_MouseWheel fires before the event loop has updated the
> slider value, so I tried inserting that wait line.  This did not help,
> the debug values before and after the wait are the same, i.e. the
> previous value of the slider.
>
> Is there a way to defer or "fake a deferral" of the MouseWheel event
> until after the value has been updated?
>
> (BTW The MouseWheel event firing before the update is right and proper
> IMO.)
>
> tia
> Bruce
>

Why don't you use the "Change" event?

-- 
Benoît Minisini




More information about the User mailing list