【发布时间】:2011-09-26 23:44:40
【问题描述】:
我想知道 SWT/jface 是否允许为应用程序系统托盘项气球工具提示指定自定义图标(预定义的 SWT.ICON_ERROR | SWT.ICON_INFORMATION | SWT.ICON_WARNING 除外)?我想做类似的事情:
ToolTip tip = new ToolTip(shell, SWT.BALLOON);
tip.setText("Notification from a tray item");
tip.setMessage("Here is a message for the user.");
tip.setIcon("/path/to/custom/icon");
trayItem.setToolTip(tip);
我知道 ToolTip 类没有 setIcon() 方法。有没有其他方法可以实现这一目标?这对于应用程序级别的通知等非常有用。谢谢!
【问题讨论】: