Bug 290845

Summary: [Widgets] Scale widget does not support TBS_TOP, TBS_BOTTOM, TBS_LEFT or TBS_RIGHT styles
Product: [Eclipse Project] Platform Reporter: Chris Fairhall <chris.fairhall>
Component: SWTAssignee: Platform-SWT-Inbox <platform-swt-inbox>
Status: NEW --- QA Contact:
Severity: enhancement    
Priority: P3 CC: eclipse.felipe, niraj.modi
Version: 3.5Keywords: triaged
Target Milestone: ---   
Hardware: PC   
OS: All   
Whiteboard:

Description Chris Fairhall CLA 2009-09-29 16:30:41 EDT
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.1) Gecko/20090624 Firefox/3.5 (.NET CLR 3.5.30729)
Build Identifier: I20090611-1540

The widgetStyle method of Scale has a hard coded style of TBS_BOTH. There is no provision to apply addition styles.

A suggestion would be to allow SWT.TOP SWT.BOTTOM SWT.LEFT or SWT.RIGHT to be passed to the Scale constructor. An absense of any of these styles would imply the default of TBS_BOTH. therefore not impacting any legacy code.

eg:
new Scale(parent, SWT.HORIZONTAL | SWT.BOTTOM);

Reproducible: Always

Steps to Reproduce:
1. Create widget.
Comment 1 Chris Fairhall CLA 2009-09-29 16:32:27 EDT
SWT version 3.550
Comment 2 Felipe Heidrich CLA 2009-09-29 16:59:18 EDT
Do other platforms offers similar support ?

I'm afraid this is available on win32 only.
Comment 3 Chris Fairhall CLA 2009-09-29 18:26:48 EDT
Does that mean supporting additional platform specific styles is out of the question?

There is no functional change in the different styles, the control just renders isself differently.
Comment 4 Felipe Heidrich CLA 2009-09-30 12:10:38 EDT
SWT is a multi platform toolkit, adding a feature that can only be supported on one platform is not very interesting for us.

That said, the feature can still be added as a hint.


We should check gtk/carbon/cocoa API, maybe it is possible they offer similar support.