mouseup in slider

When using the slider control, the mouseUp event only fires if mouseDown returns true. However, when mouseDown returns true, the slider cannot be moved. I want to move the slider and also detect when I stop sliding the slider (the mouseUp event). How can this be achieved?
I am trying to create something in the mousedrag event
me.Value = (me.Maximum - me.Minimum) * x / me.Width
But I don’t managed that yet, and I don’t know if it is the right way.

Thanks

http://katkosoft.xojonews.com/Ultimate%20Slider/Ultimate%20Slider%202.html

[quote=172982:@Alexandre Amato]When using the slider control, the mouseUp event only fires if mouseDown returns true. However, when mouseDown returns true, the slider cannot be moved. I want to move the slider and also detect when I stop sliding the slider (the mouseUp event). How can this be achieved?
I am trying to create something in the mousedrag event
me.Value = (me.Maximum - me.Minimum) * x / me.Width
But I don’t managed that yet, and I don’t know if it is the right way.[/quote]

  • Add a 100 ms timer to your project set to off
  • In the slider mousedown, enter this :

timer1.mode = timer.ModeMultiple timer1.enabled = True

  • In the timer Action event :

if system.mousedown then return else me.enabled = False msgbox "Mouseup" end if

Place whatever code you need where is now the msgbox.

Karen,

[quote]
Not Found

The requested URL /Ultimate Slider/UltimateSlider2_RBP.zip was not found on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.[/quote]

I saw this in an old realbasic forum, but I also could not download !
Thanks !!

[quote=172986:@Alexandre Amato]Karen,

I saw this in an old realbasic forum, but I also could not download !
Thanks !![/quote]

Fixed… But you may need to clear your cache

The direct link to the zip file is:

http://katkosoft.xojonews.com/Ultimate%20Slider/Ultimate%20Slider%20Project.zip

Thanks !!

You just described the ValueChanged event more or less

Indeed. Except when the user has not moved the slider.