# HG changeset patch # User Frank Benoit # Date 1213918384 -7200 # Node ID d0c469a93a5d98a7b70d90118864a6c450760f67 # Parent 9bdff8e345d5c214b55297f9028bd541c84f0c27 Scale snippet 45, thanks yidabu diff -r 9bdff8e345d5 -r d0c469a93a5d snippets/dsss.conf --- a/snippets/dsss.conf Thu Jun 05 18:56:24 2008 +0200 +++ b/snippets/dsss.conf Fri Jun 20 01:33:04 2008 +0200 @@ -44,6 +44,7 @@ [program/Snippet32.d] [sash/Snippet107.d] [sashform/Snippet109.d] +[scale/Snippet45.d] [shell/Snippet134.d] [shell/Snippet138.d] [spinner/Snippet184.d] diff -r 9bdff8e345d5 -r d0c469a93a5d snippets/scale/Snippet45.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/snippets/scale/Snippet45.d Fri Jun 20 01:33:04 2008 +0200 @@ -0,0 +1,34 @@ +/******************************************************************************* + * Copyright (c) 2000, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +module snippets.scale.Snippet45; + +import dwt.DWT; +import dwt.widgets.Display; +import dwt.widgets.Shell; +import dwt.widgets.Scale; + +import dwt.dwthelper.utils; + + +public static void main (String [] args) { + Display display = new Display (); + Shell shell = new Shell (display); + Scale scale = new Scale (shell, DWT.BORDER); + scale.setSize (200, 64); + scale.setMaximum (40); + scale.setPageIncrement (5); + shell.open (); + while (!shell.isDisposed ()) { + if (!display.readAndDispatch ()) display.sleep (); + } + display.dispose (); +} +