Reputation: 646
I'm using Java and SWT. I have added menu(on right click) to system tray. I want to change color of the text on menu items. Is it possible? I couldn't find any solution about this.
TrayItem item = new TrayItem(tray, SWT.NONE);
item.addListener(SWT.MenuDetect, new Listener() {
public void handleEvent(org.eclipse.swt.widgets.Event event) {
Menu menu = new Menu(shell, SWT.POP_UP);
MenuItem item1 = new MenuItem(menu, SWT.NONE);
item1.setText("Settings"); // **i want to change color of the text**
}
}
Upvotes: 4
Views: 1874