Mercurial > projects > dwt2
annotate org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet45.d @ 125:c43718956f21 default tip
Updated the snippets status.
author | Jacob Carlborg <doob@me.com> |
---|---|
date | Thu, 11 Aug 2011 19:55:14 +0200 |
parents | 536e43f63c81 |
children |
rev | line source |
---|---|
28 | 1 /******************************************************************************* |
2 * Copyright (c) 2000, 2004 IBM Corporation and others. | |
3 * All rights reserved. This program and the accompanying materials | |
4 * are made available under the terms of the Eclipse Public License v1.0 | |
5 * which accompanies this distribution, and is available at | |
6 * http://www.eclipse.org/legal/epl-v10.html | |
7 * | |
8 * Contributors: | |
9 * IBM Corporation - initial API and implementation | |
10 *******************************************************************************/ | |
11 module org.eclipse.swt.snippets.Snippet45; | |
12 | |
13 import org.eclipse.swt.SWT; | |
14 import org.eclipse.swt.widgets.Display; | |
15 import org.eclipse.swt.widgets.Shell; | |
16 import org.eclipse.swt.widgets.Scale; | |
17 | |
18 import java.lang.all; | |
19 | |
20 | |
120
536e43f63c81
Comprehensive update for Win32/Linux32 dmd-2.053/dmd-1.068+Tango-r5661
Denis Shelomovskij <verylonglogin.reg@gmail.com>
parents:
28
diff
changeset
|
21 void main () { |
28 | 22 Display display = new Display (); |
23 Shell shell = new Shell (display); | |
24 Scale scale = new Scale (shell, SWT.BORDER); | |
25 scale.setSize (200, 64); | |
26 scale.setMaximum (40); | |
27 scale.setPageIncrement (5); | |
28 shell.open (); | |
29 while (!shell.isDisposed ()) { | |
30 if (!display.readAndDispatch ()) display.sleep (); | |
31 } | |
32 display.dispose (); | |
33 } | |
34 |