Create a balloon tool tip for text box?

前端 未结 2 1847
花落未央
花落未央 2021-01-16 06:26

How to create a balloon tool tip for a text box in SWT?

2条回答
  •  时光说笑
    2021-01-16 06:48

    For a standard os tooltip, use:

    org.eclipse.swt.widgets.Control.setToolTipText(String)

    For example,

        final Text textArea = new Text(shell, SWT.BORDER);
        textArea.setToolTipText("Standard tooltip \n for swt control.");
    

    Here what it would look like on Windows 7:

提交回复
热议问题