Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » How to not hide cursor when typing(How to not hide cursor when typing)
How to not hide cursor when typing [message #632624] Wed, 13 October 2010 15:48 Go to next message
Andy Coleman is currently offline Andy ColemanFriend
Messages: 33
Registered: September 2009

We have a dialog which has a number of Text controls and an ok button. In most situations the user will open the dialog, accept the default values and press the ok button. To help with this we move the mouse button over the ok button when the dialog is opened.

The main problem we have is that if a user types anything into one of the text controls the mouse pointer disapears. I appreciate that this is standard behaviour (this is on Windows) but we would like to override that behaviour and keep the mouse visible?

Is there any way we can do this.

Re: How to not hide cursor when typing [message #633607 is a reply to message #632624] Mon, 18 October 2010 14:32 Go to previous message
Lakshmi ShanmugamFriend
Messages: 276
Registered: July 2009
Location: India
Senior Member

You can try something like this:
text.addModifyListener(new ModifyListener() {
public void modifyText(ModifyEvent e) {
if (display.getCursorControl() == okButton) {

If you have many text controls, you could consider using a display filter for SWT.Modify event. Add/remove the display filter when dialog opens/closes.

Lakshmi P Shanmugam
Previous Topic:SWT Browser Scrollbar
Next Topic:Preventing TreeItem to expand/collapse
Goto Forum:

Current Time: Sat Jan 18 21:20:54 GMT 2020

Powered by FUDForum. Page generated in 0.01839 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top