Mercurial > projects > dwt2
comparison org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet24.d @ 29:4e5843b771cc
First snippets buildable on windows
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Sun, 22 Mar 2009 19:55:00 +0100 |
parents | 69b1fa94a4a8 |
children | 9f4c18c268b2 |
comparison
equal
deleted
inserted
replaced
28:69b1fa94a4a8 | 29:4e5843b771cc |
---|---|
34 Display display = new Display (); | 34 Display display = new Display (); |
35 Shell shell = new Shell (display); | 35 Shell shell = new Shell (display); |
36 shell.setLayout (new RowLayout ()); | 36 shell.setLayout (new RowLayout ()); |
37 Combo combo = new Combo (shell, SWT.NONE); | 37 Combo combo = new Combo (shell, SWT.NONE); |
38 combo.setItems (["A-1", "B-1", "C-1"]); | 38 combo.setItems (["A-1", "B-1", "C-1"]); |
39 Text text = new Text (shell, SWT.SINGLE | DWT.BORDER); | 39 Text text = new Text (shell, SWT.SINGLE | SWT.BORDER); |
40 text.setText ("some text"); | 40 text.setText ("some text"); |
41 combo.addListener (SWT.DefaultSelection, new class() Listener{ | 41 combo.addListener (SWT.DefaultSelection, new class() Listener{ |
42 public void handleEvent (Event e) { | 42 public void handleEvent (Event e) { |
43 Stdout(e.widget.toString() ~ " - Default Selection\n"); | 43 Stdout(e.widget.toString() ~ " - Default Selection\n"); |
44 } | 44 } |