[Gambas-user] How to set a slider value?

Fabien Bodard gambas.fr at ...626...
Mon Aug 24 16:33:39 CEST 2009


2009/8/24 Aleksandrs Livshics <aleks.l at ...1865...>:
> Dear Gambas users,
> I am new to Gambas and my question may be silly,
> however I cannot find how to set a slider value in the
> code. (Not the initial value, this is easy)
> I want to specify some event (like double click on a slider)
> to force it to jump to a predefined position/value.
>
> If I write Dbl_click() method and use something like
> My_slider.value = The_value
> in it, then slider on screen does not move from where
> I have set it previously with a mouse. More precisely,
> It jumps to a position which corresponds to The_value
> and back to where it was before!
> Any ideas would be helpful.
>

try to stop the event after setting the value

public sub MySlider_DblClick()
  My_slider.value = The_value
  Stop Event
end

> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
> trial. Simplify your report design, integration and deployment - and focus on
> what you do best, core application coding. Discover what's new with
> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>




More information about the User mailing list