Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 408493

Summary: [Slider] Does not honour setMaximum() accurately
Product: [RT] RAP Reporter: John Gymer <jgymer>
Component: RWTAssignee: Project Inbox <rap-inbox>
Status: RESOLVED INVALID QA Contact:
Severity: normal    
Priority: P3    
Version: 2.1   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description John Gymer CLA 2013-05-20 09:17:46 EDT
The Slider widget does not calculate positions correctly when setThumb() is > 1.

For example:
								slider.setMinimum(0);
slider.setMaximum(101); // for some reason, Sliders go up to Max-1 in SWT
slider.setIncrement(1);
slider.setPageIncrement(10);
slider.setThumb(10);

This should give a possible range of 0-100, as it does in SWT.
However, in RAP, the maximum possible is only 91, due to the Thumb size.

Thanks, John
Comment 1 Ivan Furnadjiev CLA 2013-05-20 09:32:23 EDT
John, just checked it in SWT (Windows) and it behaves exactly like in RAP - with the setup above the maximum possible value is 91 (max - thumb size). Please reopen if you disagree.
Comment 2 John Gymer CLA 2013-05-21 08:25:25 EDT
Sorry Ivan,
You are absolutely correct.
It seems a silly way to do it, but yes, SWT works the same way.
I have adjusted by code (SWT, RAP and TABRIS) to set the slider's Max to my maximum value PLUS the thumb size.
Thanks, John