XWidgetSoft Forum https://www.bbs.xwidget.com/ |
|
Read progress bar value while mouse down - Solved (again) https://www.bbs.xwidget.com/viewtopic.php?f=7&t=2215 |
Page 1 of 1 |
Author: | Sooner266 [ October 11th, 2012, 9:31 am ] |
Post subject: | Read progress bar value while mouse down - Solved (again) |
Edit: See post #3 for the solution. Does anyone know of a way to read a progress bar's value while the mouse is down on it? I want to update a value real time while the user is dragging it around. I've tried starting a loop on mouse down, and end it on mouse up, but it doesn't seem to work. Thanks. |
Author: | Sooner266 [ October 11th, 2012, 9:42 am ] |
Post subject: | Re: Read progress bar value while mouse down |
Edit: Ignore this message, see the next post. Well I kind of found a way to do it. Here's what I have so far. UpdateMinimum sets the value of a text object based on minBar's percent. Code: var minBarMouseDown; function minBarOnMouseDown(){ minBarMouseDown = true; } function minBarOnMouseUp(){ updateMinimum(); // in case they don't move the mouse minBarMouseDown = false; } function minBarOnMouseMove(){ if(minBarMouseDown == true){ updateMinimum(); } } Only problem is, as the mouse moves, it shows the value of the last update, not the current position of the mouse. Do we know if its possible to get the current position of percent on the progress bars? |
Author: | Sooner266 [ October 11th, 2012, 10:44 am ] |
Post subject: | Re: Read progress bar value while mouse down (not solved) |
Lol... Sorry to keep doing this, but I have found the solution (really this time): the OnChange event... duh. Here's all I needed: Code: function minBarOnChange(){ updateMinimum(); } I can confirm this is a real time update that occurs on mouseDown on the progress bar. No variable needed or any of that other stuff. Hope this helps someone else trying to do this. |
Page 1 of 1 | All times are UTC - 8 hours |
Powered by phpBB® Forum Software © phpBB Group http://www.phpbb.com/ |