XWidgetSoft Forum

XWidget & XLaunchpad , Desktop customization
It is currently May 10th, 2025, 8:53 am

All times are UTC - 8 hours




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: October 11th, 2012, 9:31 am 
Offline
User avatar

Joined: August 2nd, 2012, 12:43 am
Posts: 26
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.

_________________
deviantArt profile

My Widgets:
Game Specials v1.1


Last edited by Sooner266 on October 11th, 2012, 10:45 am, edited 5 times in total.

Top
 Profile  
 
PostPosted: October 11th, 2012, 9:42 am 
Offline
User avatar

Joined: August 2nd, 2012, 12:43 am
Posts: 26
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?

_________________
deviantArt profile

My Widgets:
Game Specials v1.1


Last edited by Sooner266 on October 11th, 2012, 10:44 am, edited 1 time in total.

Top
 Profile  
 
PostPosted: October 11th, 2012, 10:44 am 
Offline
User avatar

Joined: August 2nd, 2012, 12:43 am
Posts: 26
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.

_________________
deviantArt profile

My Widgets:
Game Specials v1.1


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC - 8 hours


Who is online

Users browsing this forum: No registered users and 17 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Powered by phpBB® Forum Software © phpBB Group