Community
Participate
Working Groups
N20051208-0010 I have a toolbar with a ToolItem, I want a different image to appear when the mouse hovers, so I do both setImage() and setHotImage() on the tool item. However, on the mac, I only ever see the hot item. Here's a simple example that demonstrates the problem: -------------------- public static void main(String[] args) { Display display = new Display(); Shell shell = new Shell(display); shell.setLayout(new FillLayout()); Image normalImage = new Image(display, 16, 16); GC gc = new GC(normalImage); gc.setBackground(display.getSystemColor(SWT.COLOR_BLUE)); gc.fillRectangle(0, 0, 16, 16); gc.dispose(); Image hotImage = new Image(display, 16, 16); gc = new GC(hotImage); gc.setBackground(display.getSystemColor(SWT.COLOR_RED)); gc.fillRectangle(0, 0, 16, 16); gc.dispose(); ToolBar bar = new ToolBar(shell, SWT.FLAT); ToolItem item = new ToolItem(bar, SWT.NONE); item.setImage(normalImage); item.setHotImage(hotImage); shell.pack(); shell.open(); while (!shell.isDisposed()) { if (!display.readAndDispatch()) { display.sleep(); } } normalImage.dispose(); hotImage.dispose(); display.dispose(); }
Closing report, platform is discontinued. This is not a problem on cocoa port.