Hey Guys,
I migrated a project from V7.9.10 to V8.0.10 and found that the Tooltips I was showing when using the system.gui.createPopupMenu and formatting the menuitems are no longer working.
Code below. Not sure if this is just a V8 issue or something that needs tweaking to work in 8? Possibly related to the colour issue
http://forum.inductiveautomation.com/t/bug-13063-color-of-jmenu-items-in-ignition-8/25201
from javax.swing import JMenuItem
from javax.swing import JLabel
from javax.swing.border import EmptyBorder
from java.awt import Font
def doMenuItem1(event):
print "Menu 1"
import system
menu = system.gui.createPopupMenu([],[])
label1 = JLabel("Label1")
label1.foreground = system.gui.color(85,85,85)
label1.font = Font("Tahoma", Font.BOLD+Font.ITALIC, 14)
menuitem1 = JMenuItem ("Menuitem1",actionPerformed=doMenuItem1)
menuitem1.setToolTipText("Menuitem1 tooltip")
menuitem1.background = system.gui.color(192,192,192)
menuitem1.foreground = system.gui.color(0,0,0)
menu.add(label1)
menu.addSeparator()
menu.add(menuitem1)
menu.setBackground(system.gui.color(192,192,192))
menu.show(event,event.source.parent.x,event.source.parent.y+40)
Cheers