www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.dwt - ToolTip problem

reply kenshiro55 <kenshiro55 users.sourceforge.net> writes:
I have this code:

int main(char[][] params) {
	Shell shell = new Shell(DWT.SHELL_TRIM);
	shell.setVisible(true);
	ToolTip	toolTip = new ToolTip(shell, DWT.BALLOON | DWT.ICON_INFORMATION);
	toolTip.setText("Tooltip");
	toolTip.setMessage("Tooltip");
	toolTip.setLocation(200, 200);
	toolTip.setVisible(true);
	toolTip.setAutoHide(true);
	Display display = shell.getDisplay();	
	shell.setVisible(true);
	shell.setSize(200, 200);  
	while (!shell.isDisposed()) {
		if (!display.readAndDispatch()) {
			display.sleep();
		}
	}
	display.dispose();
	return 0;
}


The tooltip is hidden if I move the window or after a while.

Buf if I include a manifest using:
  - dwt.res and the buildflag -L/rc:dwt
  - or if a file test.exe.manifest is present
the tooltip don't disappear.

What can I do to make it work ?

Tested with dmd 1.0.28, dwt-win 2008-07-21 and tango 0.99.6.
Jul 24 2008
parent Frank Benoit <keinfarbton googlemail.com> writes:
kenshiro55 schrieb:
 I have this code:
 
 int main(char[][] params) {
 	Shell shell = new Shell(DWT.SHELL_TRIM);
 	shell.setVisible(true);
 	ToolTip	toolTip = new ToolTip(shell, DWT.BALLOON | DWT.ICON_INFORMATION);
 	toolTip.setText("Tooltip");
 	toolTip.setMessage("Tooltip");
 	toolTip.setLocation(200, 200);
 	toolTip.setVisible(true);
 	toolTip.setAutoHide(true);
 	Display display = shell.getDisplay();	
 	shell.setVisible(true);
 	shell.setSize(200, 200);  
 	while (!shell.isDisposed()) {
 		if (!display.readAndDispatch()) {
 			display.sleep();
 		}
 	}
 	display.dispose();
 	return 0;
 }
 
 
 The tooltip is hidden if I move the window or after a while.
 
 Buf if I include a manifest using:
   - dwt.res and the buildflag -L/rc:dwt
   - or if a file test.exe.manifest is present
 the tooltip don't disappear.
 
 What can I do to make it work ?
 
 Tested with dmd 1.0.28, dwt-win 2008-07-21 and tango 0.99.6.
It is fixed now in dwt-win and also in tango. This again was a struct size mismatch. I hope someone can complete the test from my "windows user help needed" posting in this NG. kenshiro55: Thanks for reporting this
Jul 24 2008