Mercurial > projects > dwt-samples
changeset 23:073094250126
Added texts to the items. The ToolItems tooltip works now on linux, the TabItems tooltip is still the shell text.
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Sun, 02 Mar 2008 18:51:50 +0100 |
parents | 40dae5136e84 |
children | 5681fc54f1c1 |
files | dwtsnippets/tooltips/Snippet41.d |
diffstat | 1 files changed, 6 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/dwtsnippets/tooltips/Snippet41.d Sun Mar 02 18:46:18 2008 +0100 +++ b/dwtsnippets/tooltips/Snippet41.d Sun Mar 02 18:51:50 2008 +0100 @@ -7,7 +7,7 @@ * * Contributors: * IBM Corporation - initial API and implementation - * D Port: + * Port to the D programming language: * Jesse Phillips <Jesse.K.Phillips+D> gmail.com *******************************************************************************/ @@ -31,15 +31,19 @@ auto string = "This is a string\nwith a new line."; auto display = new Display (); auto shell = new Shell (display); - auto folder = new TabFolder (shell, DWT.BORDER); + + TabFolder folder = new TabFolder (shell, DWT.BORDER); folder.setSize (200, 200); auto item0 = new TabItem (folder, 0); + item0.setText( "Text" ); item0.setToolTipText ("TabItem toolTip: " ~ string); auto bar = new ToolBar (shell, DWT.BORDER); bar.setBounds (0, 200, 200, 64); + ToolItem item1 = new ToolItem (bar, 0); + item1.setText( "Text" ); item1.setToolTipText ("ToolItem toolTip: " ~ string); shell.setToolTipText ("Shell toolTip: " ~ string);