[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[List Home]
|
[platform-swt-dev] Need help about using Display.post
|
- From: qrtt1@xxxxxxxxxxxxxxxx
- Date: Sat, 14 Jan 2006 17:22:07 +0800 (CST)
- Delivered-to: platform-swt-dev@eclipse.org
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