Slider, Scrollbar [message #1701349] |
Sun, 12 July 2015 11:31 |
Andrzej Borucki Messages: 13 Registered: August 2013 |
Junior Member |
|
|
I do
Slider slider = new Slider (shell, SWT.HORIZONTAL);
Rectangle clientArea = shell.getClientArea ();
slider.setBounds (clientArea.x + 30, clientArea.y + 30, 200, 32);
I see only square thumb, left and right arrow, but not see bar. I want, thumb should be narrow, narrowing at bottom at point to bar where maybe was graduation.
I try scrollbar
Scrollbar scrollbar = new Scrollbar (Scrollbar.HORIZONTAL);
Rectangle clientArea = shell.getClientArea ();
scrollbar.setBounds (clientArea.x + 30, clientArea.y + 30, 200, 32);
But in internet samples scrollbar is get only from compound object, not created.
For example ScrollBar vbar=scomp.getVerticalBar()
http://www.programcreek.com/java-api-examples/index.php?api=org.eclipse.swt.widgets.ScrollBar
I want do two things: one is bar with slider to points position in playback.
Second is drawing area with scrollbars which can be repaint by me if scrollbars moved.
|
|
|
Re: Slider, Scrollbar [message #1701472 is a reply to message #1701349] |
Mon, 13 July 2015 14:51 |
Eclipse User |
|
|
|
For your playback scrubber, I think you want a Scale. You'll likely want to eventually build your own custom widget.
For the drawing area, you can use a Canvas with H_SCROLL and V_SCROLL.
The Slider's thumb is automatically sized based on the gap between and increment. We don't have control over the size.
ScrollBars are created to wrap the sliders in existing native components; they aren't created programmatically.
Hope that helps.
Brian.
|
|
|
Powered by
FUDForum. Page generated in 0.02940 seconds