Quinn-Curtis Forums
Quinn-Curtis Forums
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Tools for Java
 QCRTGraph for Java
 RTControlScrollBar min value
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

chippr

16 Posts

Posted - 04 Sep 2008 :  13:56:29  Show Profile  Reply with Quote
When a RTControlScrollBar I'm using is at it's farthest rightmost point, and I do a getRTValue(), it is returning 10.0 rather than 0.0. When I do a getRTMinimum() it returns 0.0. Am I doing something wrong?

Thanks

quinncurtis

1586 Posts

Posted - 04 Sep 2008 :  15:24:02  Show Profile  Reply with Quote
Maybe we are missing something.
When a scroll bar is at the rightmost position, it is at its maximum value, which in your case is 10.0. When it is at the leftmost position, it is at its mimimum value, or 0.0 in your case. We don't know why you are expecting the opposite.
Go to Top of Page

chippr

16 Posts

Posted - 04 Sep 2008 :  15:30:09  Show Profile  Reply with Quote
Hmmmmm....When I set RTValue of my scrollbar to zero it moves it all the way to the right. When I print the values out, the farthest left is 100 and right 10. Maybe it's because I'm using the old 1.4 version?

Go to Top of Page

chippr

16 Posts

Posted - 04 Sep 2008 :  15:48:54  Show Profile  Reply with Quote
Also in your polygraph example, you set RTValue to 100 for the time axis control scroll bar and at least when I run your demo the slider starts at the left most position. Maybe the 10 comes from the "smallchange" arg I'm using in the constructor?
Go to Top of Page

chippr

16 Posts

Posted - 04 Sep 2008 :  15:50:30  Show Profile  Reply with Quote
I meant the "tickfrequency" not the "smallchange" arg
Go to Top of Page

quinncurtis

1586 Posts

Posted - 04 Sep 2008 :  16:36:54  Show Profile  Reply with Quote
We had it wrong. Though it does seem counter-intuitive for horizontal scroll bars. The minimum is on the right. I think someone inverted it because we wanted vertical scroll bars, which is what we use 90% of the time, to have their maximum value at the top position.

The underlying JScrollbar control, when initialized for a range of 0 to 100, seems to return a value of 90 when at the maximum. So our software uses that value in the calculation, which when inverted results in the 10. I don't know why but there is probably some explanation out there on the web. We will have to look into it.
Go to Top of Page

quinncurtis

1586 Posts

Posted - 04 Sep 2008 :  16:57:07  Show Profile  Reply with Quote
It appears that the entire width of the JScrollBar is initialized 0-100 (or whatever min-max you choose). But the left edge of the "thumb" is what value is returned. Since the left edge of the thumb is not at the maximum, it returns a value less than the maximum. It this case the thumb has a width 1/10 of the width of the scroll bar, so when the thumb is furthest to the right, the left edge is at 90. At least that's our theory.
Go to Top of Page

chippr

16 Posts

Posted - 04 Sep 2008 :  17:04:46  Show Profile  Reply with Quote
Yeah I had the same theory. I just assume the min is 10 now...
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Quinn-Curtis Forums © 2000-2018 Quinn-Curtis, Inc. Go To Top Of Page
Powered By: Snitz Forums 2000 Version 3.4.07