I want to display different tooltip text for each element in SWT combo widget. I found two similar questions but none of them seems to solve the question.
1) Set tooltip text for each element in an SWT Combo widget
2) how to add tooltip on the entries and NOT on the combo in JFace ComboViewer
Combo combo = new Combo(container, SWT.READ_ONLY | SWT.BORDER);
combo.setBounds(278, 298, 135, 20);
combo.add("first");
combo.add("second");
combo.add("third");
combo.add("fourth");
combo.addMouseTrackListener(new MouseTrackAdapter() {
@Override
public void mouseHover(MouseEvent e) {
// TODO Auto-generated method stub
super.mouseHover(e);
// logic which will get me a hovered combo item without
// selecting any particular item.
}
});
In the above code when user hover on comboitem
first then I want to display 1st in tooltip, for second display 2nd in tooltip, likewise..
Please help me with this problem.