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
Member
Hi,

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.

Thanks
Andy
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 P ShanmugamFriend
Messages: 279
Registered: July 2009
Location: India
Senior Member
Hi,

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

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: Thu Sep 19 09:50:41 GMT 2024

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

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

Back to the top