Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Text controls
Text controls [message #441638] Wed, 18 August 2004 08:20 Go to next message
Robert Bacs is currently offline Robert BacsFriend
Messages: 165
Registered: July 2009
Senior Member
Hi,

I have a row with editor controls (mostly Text widgets), every editor
control need to contain correct values before they disposed. Is there any
way to verify a text widget value just before loosing the focus and avoid
focus lost if the value is erronous ?
I tried with verify listener but this is called every time a user changes
the content of a control. With focusLost is there another problem: suppose
there is two adjacent controls and both contains erronous values, in the
first control the user hits the TAB and I'm getting a focusLost event for
the first control and realize that the value is erronous, so I need to set
the focus back to the control, but the focus is in the adjacent control and
I'm getting a focusLost event on the second control which contains an
erronous value too, this leads to a endless cycle.

What I need is a way to block the focusLost event in a way like event.doit =
false in verifyEvent.

Best regards,
Boby
Re: Text controls [message #441640 is a reply to message #441638] Wed, 18 August 2004 10:39 Go to previous message
Eclipse UserFriend
Originally posted by: v.j.b

I'm not sure, but you might be able to verify your content, and then set the
'event.doit' field to 'false'. That way, the event won't take place, and it
should prevent the other widget from gaining focus.

This might not be possible with a FocusListener, but maybe a
traverseListener might do the job?
Previous Topic:Embedding MSWord with OLE
Next Topic:article on rich ui in java
Goto Forum:
  


Current Time: Fri Apr 19 07:33:57 GMT 2024

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

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

Back to the top