0

Can we use ComboViewer to listen mouse hover event? I want to basically display the hover value in tool tip for the list in a combo box

Example:

I have a combo list with values "a", "b" and "c". When I move the mouse over "b" I need to display "b" in tool tip.

viewer.setContentProvider(ArrayContentProvider.getInstance());
viewer.setInput({"a", "b", "c"})
viewer.getCombo().addMouseMoveListener(new MouseMoveListener(){
 public void mouseMove(MouseEvent event){

  // here i need a logic to read identify on which value the mouse is over.

 }
});
Wall
  • 88
  • 1
  • 9
  • How about `viewer.getCombo().addMouseTrackListener(...)`? – Baz Nov 12 '13 at 10:06
  • This helps! But how can I identify on which item the mouse is currently pointing to – Wall Nov 12 '13 at 12:09
  • You will probably have to iterate and compare the `y` position to the mouse event. – Baz Nov 12 '13 at 12:11
  • I have edited my question with an example. With y position from the mouse event, please explain how to identify the list item. – Wall Nov 12 '13 at 12:25
  • Hmmm, seems like the `Combo` doesn't fire mouse events for the drop-down part... – Baz Nov 12 '13 at 12:44

0 Answers0