| Summary: | org.eclipse.swt.custom.PopupList - should be able to set the SWT.H_SCROLL style on the List widget | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Nick Chiu <Nick.Chiu> | ||||
| Component: | SWT | Assignee: | Lakshmi P Shanmugam <lshanmug> | ||||
| Status: | RESOLVED FIXED | QA Contact: | Lakshmi P Shanmugam <lshanmug> | ||||
| Severity: | enhancement | ||||||
| Priority: | P3 | CC: | eclipse.felipe, remy.suen, Silenio_Quarti | ||||
| Version: | 3.4 | ||||||
| Target Milestone: | 3.7 M2 | ||||||
| Hardware: | PC | ||||||
| OS: | Windows XP | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
|
Description
Nick Chiu
After 3.6 New API are not permitted at this time. Sorry. Lakshmi, talk to SSQ before doing anything here since API could be involved. Created attachment 176534 [details]
patch-1
When the user sets SWT.H_SCROLL in the style of the PopupList, the List will be created with SWT.H_SCROLL.
Test case:
public class PopupListExample1 {
public static void main(String[] args) {
Display display = new Display();
final Shell shell = new Shell(display);
shell.setLayout(new RowLayout());
Button button = new Button(shell, SWT.PUSH);
button.setText("show popup");
button.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
PopupList list = new PopupList(shell, SWT.H_SCROLL);
list.setItems(new String[] {"veryveryveryveryveryveryloooooooooongtext", "jojo", "lk", "k", "l", "op", "opop", "text"});
list.open(shell.getBounds());
}
});
shell.pack();
shell.open();
while (!shell.isDisposed()) {
if (!display.readAndDispatch())
display.sleep();
}
display.dispose();
}
}
SSQ, can you please review? Looks good. Fixed in HEAD > 20100816. |