Is there any way to change how the icon appearing for each application?
Attached picture shows I have 4 different applications developed with Ignition. I want it to be different so users won’t be frustrating looking for the right application to work with when they have multiple (Ignition) applications open at the same time.
Even though the launch icon has been set in Project Properties and the desktop icons are different, when launched, they’re all the same on taskbar.
This was fun, too. Try this: Add a hidden image component to your window and load your icon image into it. Then put this code in your window internalFramedOpened event:
from java.awt import Frame
win = system.gui.getParentWindow(event)
img = win.rootContainer.getComponent("Image")
parent = win
while parent is not None:
win = parent
parent = win.getParent()
win.setIconImage(system.print.createImage(img))
It seems to work but the image is not loaded (png image is uploaded into Image Management).
What I did was,
add image component and set image path to the image
uncheck the visible properties of the image
append your code to the mentioned event
I print out ‘win’ before the setIconImage and it gives me this.
javax.swing.JFrame[frame0,-8,-8,1936x1176,invalid,layout=java.awt.BorderLayout,title=Configuration Editor Development - OPERATIONS,resizable,iconified,maximized,defaultCloseOperation=DO_NOTHING_ON_CLOSE,rootPane=javax.swing.JRootPane[,8,31,1920x1137,invalid,layout=com.incors.plaf.alloy.bk,alignmentX=0.0,alignmentY=0.0,border=,flags=16777673,maximumSize=,minimumSize=,preferredSize=],rootPaneCheckingEnabled=true]
I spot a couple of invalid words but not sure what it really means.
Can you shed some light please?
After upgraded to 7.7, the above script didn’t work. Jae helped me get around by providing this script to me.
Forgot to mention that, put this script under visionWindowOpened event
from javax.imageio import ImageIO
from java.net import URL
from javax.swing import JFrame
from org.python.core import Py