how to add tooltip on the entries and NOT on the c

2019-02-18 17:26发布

I am loading my ComboViewer with over one thousand elements.

Some elements are longer than the width of underlying combo.

I want to add tooltip on the entries and NOT on the combo.

I want it in such a way that, when the list drops down and the user places the mouse pointer over one of the value, the entire text should be displayable via tooltip similar to the tooltip shown for a JFace TableViewer.

1条回答
劳资没心,怎么记你
2楼-- · 2019-02-18 17:48

If you are using a ComboViewer and you provide your own CCombo instance, you can get children of the CCombo and one of them should be a List control that it shows as a dropdown menu. You can add your MouseTrackListener to this List control and show tooltip depending on which item the mouse is hovering.

查看更多
登录 后发表回答