Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Focus Listner to org.eclipse.nebula.widgets.tablecombo.TableCombo  RSS feed

 
Bharath Raja
Ranch Hand
Posts: 111
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I need to add focus listener for TableCombo (org.eclipse.nebula.widgets.tablecombo.TableCombo). Is there any special type of listener event for this TableCombo or can we use our swt focus listener (org.eclipse.swt.events.FocusListener). I have used swt foucs listener. But it doesn't work. Please find my code as follow.



what I done wrong here.
 
Lance Colton
Ranch Hand
Posts: 64
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bharath Raja wrote:
what I done wrong here.


Maybe try a SelectionAdapter() ?

ex.
 
Bharath Raja
Ranch Hand
Posts: 111
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
@Colton.

Thanks for your reply.. But my case is, I need to get the values in combo box (org.eclipse.nebula.widgets.tablecombo.TableCombo) while its focus out... and

SelectionAdapter controls the selection listener only.. Isn't it?
 
Lance Colton
Ranch Hand
Posts: 64
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bharath Raja wrote:@Colton.

Thanks for your reply.. But my case is, I need to get the values in combo box (org.eclipse.nebula.widgets.tablecombo.TableCombo) while its focus out... and

SelectionAdapter controls the selection listener only.. Isn't it?


I'm not sure I understand your question, you need to get the values that are not selected in the combo box?
 
Bharath Raja
Ranch Hand
Posts: 111
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Lance Colton wrote:
I'm not sure I understand your question, you need to get the values that are not selected in the combo box?


let me explain my requirement clear...My combo box have some default selected value while it gets loaded. I need to get hold the value in TableCombo as object/variable, even the user doesn't change the default selected value, that means the user even doesn't touch the combo box.. that's why i decided to use focus lost event of focus listener.. but got strucked
 
Lance Colton
Ranch Hand
Posts: 64
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bharath Raja wrote:
let me explain my requirement clear...My combo box have some default selected value while it gets loaded. I need to get hold the value in TableCombo as object/variable, even the user doesn't change the default selected value, that means the user even doesn't touch the combo box.. that's why i decided to use focus lost event of focus listener.. but got strucked


so you need to grab the default selections,

maybe try this?
SWT.DefaultSelection Example

sorry for the late reply been kinda busy
 
Bharath Raja
Ranch Hand
Posts: 111
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Lance Colton wrote:
maybe try this?
SWT.DefaultSelection Example

let me check...
Lance Colton wrote:
sorry for the late reply been kinda busy

no probs,,,
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!