Skip to main content



      Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Focus Issue
Focus Issue [message #1008047] Fri, 08 February 2013 11:07 Go to next message
Eclipse UserFriend
I've got a composite whose first control is a text control followed by some buttons and then some multiline text controls. If nothing in the composite has focus and I click in one of the multi line text controls, the multiline text control gets focus, then loses it and the first text control gains focus. Focus never goes back to the text control where the click occurs. I can force it back by listening for the mouse click but that results in some jumpy behavior if the first control has scrolled off the composite. So, how do I get the focus to stay where it belongs?

thanks,

Nick

[Updated on: Fri, 08 February 2013 11:17] by Moderator

Re: Focus Issue [message #1015717 is a reply to message #1008047] Fri, 01 March 2013 16:29 Go to previous message
Eclipse UserFriend
Hi Nick, sorry for the late response,

This should not happen, there must either be an swt bug (though I've
never heard of this before), or perhaps your code is doing something to
inadvertently cause this? Are you able to make a snippet (ideal
template: http://www.eclipse.org/swt/faq.php#whatisasnippet ) that
demonstrates the problem? And which platform do you see this on?

Grant


On 2/8/2013 11:07 AM, Nick Collier wrote:
> I've got a composite whose first control is a text control followed by
> some buttons and then some multiline text controls. If nothing in the
> composite has focus and I click in one of the multi line text controls,
> the multiline text control gets focus, then loses it and the first text
> control gains focus. Focus never goes back to the text control where the
> click occurs. I can force it back by listening for the mouse click but
> that results in some jumpy behavior if the first control has scrolled
> off the composite. So, how do I get the focus to stay where it belongs?
>
> thanks,
>
> Nick
Previous Topic:Virtual TableViewer sorting causes selection problems
Next Topic:Setting specific background and border colors to buttons
Goto Forum:
  


Current Time: Tue Jul 22 14:30:35 EDT 2025

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

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

Back to the top