views:

336

answers:

1

Hi,

I would need a scale-widget in SWT that looks like the following example: http://www.java2s.com/Code/Java/SWT-JFace-Eclipse/Scales.htm

If I run this example under Ubuntu (Gnome) the scale looks like this: http:// book.javanb.com/swt-the-standard-widget-toolkit/ch10lev1sec2.html

But actually I would prefer to have these steps beside the bar.

What can I do?

Thank you, Tobias

A: 

You can change the orientation by setting the style to SWT.HORIZONTAL or SWT.VERTICAL in the constructor, othervise the look depends on the OS or the windowing system you're using.

Kire Haglin
Thank you for your reply!I am thinking of using the Swing Slider component (http://java.sun.com/docs/books/tutorial/uiswing/components/slider.html) via the SWT-AWT-Bridge (http://www.eclipse.org/articles/article.php?file=Article-Swing-SWT-Integration/index.html).
toobb
Small update: I tried it using the SWT/AWT bridge and under Gnome it works fine. But when I run the app on a Mac, you are not able to move the slider knob.So I will have to choose an other widget..
toobb