Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[platform-swt-dev] Need help about using Display.post

Hi all, 
	I have been written a little applaction use java.awt.Robt class. 
Today I see another method to implement it which is Display.post method, 
but I try all the things to make a ctrl+a press and release. Nothing 
happen in my eclipse editor. If it would work, all the text in my editor 
will be selected.

some test code here:
	public void sendKeyT(char c) {

		/* test */
		e.stateMask = SWT.CTRL;
		e.type = SWT.KeyDown;
		display.post(e);
		e.type=SWT.KeyDown;
		e.character=c;
		e.type = SWT.KeyUp;
		display.post(e);		
	}

any comment is appreciated
ChingYi Chan 



Back to the top