Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Handle Focus in Custom Controls(Proper handling of FocusLost/FocusGained in Custom controls)
Handle Focus in Custom Controls [message #537892] Fri, 04 June 2010 06:32 Go to next message
Jesper Jensen is currently offline Jesper JensenFriend
Messages: 1
Registered: June 2010
Junior Member
Hello Experts

Our Control
I have a Custom SWT implementation of a Combobox/DropDownList.
This is implemented as a Composite containing a Text and a Button.
When the list is showed, we use a List control that is placed on top of everything and positioned at the Text and Button.

This works as expected.

The Problem
But we are having issues with focusLost and focusGained.
Ultimately i would like for any external component to throw a focusGained when any part of the custom control gains focus and only throw a focusLost when focus is lost from any part and no other part gains focus.

I would like to avoid handling focusLost and focusGained when focus is merely moved from the text to the button inside my custom control.

Do anyone know of an API to know, during focusLost, where focus will land?
Do anyone have an idea how to implement this in any way?
Re: Handle Focus in Custom Controls [message #538334 is a reply to message #537892] Mon, 07 June 2010 12:07 Go to previous messageGo to next message
Praveen  is currently offline Praveen Friend
Messages: 86
Registered: July 2009
Member
Jesper Jensen wrote:
> Do anyone know of an API to know, during focusLost, where focus will land?
> Do anyone have an idea how to implement this in any way?
The implementation of CCombo handles these scenarios. So, have a look at
the code of CCombo esp the methods handleFocus(), isFocusControl() etc
for handling focus between Text/Button controls.
At any instance to deal with multiple controls, we generally use
display.addFilter() to get notified when focus is gained/lost on any
controls of the shell.
multiple invoices(birt reports) [message #538365 is a reply to message #538334] Mon, 07 June 2010 13:25 Go to previous message
Jithu  is currently offline Jithu Friend
Messages: 1
Registered: June 2010
Junior Member
[I am using two tables, first table have group by xxxx, and details of xxx and second table will have group by xxxx and details of xxx.
my requirement is want to display the report First table data1, second table data1, first table data2, second table data2..so on.


I am able to diplay the as per my requirement but second table details will be giving all the details data every time, I mean second data1 details having second data1 details plus second data 2 details and so on
how Can I fix it? any one have solution for this please help me out.

Thanks,
Jithu

[Updated on: Mon, 07 June 2010 13:57]

Report message to a moderator

Previous Topic:SWT Date Time in 24 hours format
Next Topic:Java/SWT/Webstart application crashes on Linux
Goto Forum:
  


Current Time: Thu Mar 28 17:10:08 GMT 2024

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

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

Back to the top