Mercurial > projects > dwt2
comparison org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet38.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 |
---|---|
28 import tango.util.Convert; | 28 import tango.util.Convert; |
29 | 29 |
30 void main () { | 30 void main () { |
31 auto display = new Display (); | 31 auto display = new Display (); |
32 auto shell = new Shell (display); | 32 auto shell = new Shell (display); |
33 auto table = new Table (shell, SWT.MULTI | DWT.BORDER | DWT.FULL_SELECTION); | 33 auto table = new Table (shell, SWT.MULTI | SWT.BORDER | SWT.FULL_SELECTION); |
34 table.setLinesVisible (true); | 34 table.setLinesVisible (true); |
35 table.setHeaderVisible (true); | 35 table.setHeaderVisible (true); |
36 char[][] titles = [" ", "C", "!", "Description", "Resource", "In Folder", "Location"]; | 36 char[][] titles = [" ", "C", "!", "Description", "Resource", "In Folder", "Location"]; |
37 int[] styles = [SWT.NONE, DWT.LEFT, DWT.RIGHT, DWT.CENTER, DWT.NONE, DWT.NONE, DWT.NONE]; | 37 int[] styles = [SWT.NONE, SWT.LEFT, SWT.RIGHT, SWT.CENTER, SWT.NONE, SWT.NONE, SWT.NONE]; |
38 foreach (i,title; titles) { | 38 foreach (i,title; titles) { |
39 auto column = new TableColumn (table, styles[i]); | 39 auto column = new TableColumn (table, styles[i]); |
40 column.setText (title); | 40 column.setText (title); |
41 } | 41 } |
42 int count = 128; | 42 int count = 128; |