Equivalent to WINCC's Picture Window in Ignition

Hello,

I am creating an summary page and would like to have set of rectangles which let user to 'view' status of other windows from there. The idea is similar to Picture Window in WINCC, where I can point to picture name and importantly have choice how to scale into the container rectangle.
I thing in that can have strecthed, scaled, or no scale which will show horizontal and vertical scroll bars on the rectangle.
Is there anything in Ignition that will let me achieve this? I am using v7.9

Thank you.

You have this tagged as Perspective, but that didn't exist in Ignition 7.9; are you sure your version is correct, or did you mean a different module such as Vision? This clarification will help us to provide the correct answer.

thanks for that. It's vision, Ignition 7.9

You can have screenshots of these other windows and display them as images, which i have done to allow people to navigate to various reports (with a preview of what the report may look like.

However i don't think there is any way to have a "live" or "dynamic" view of a window you've built in the Vision module.

I'm not familiar with winCC, but if I'm inferring correctly, this is a preview with mouse hover? If so, using Richards picture idea could work with Vision's mouseover text. Here is a method I developed some time ago that accomplishes this:

Picture window in WIN CC is not a simple object to show a picture but more like the embedded view in Perspective, a window into another.
I don't think vision have this possibility. The only work around that could maybe work is by the use of templates.

2 Likes

Yep, you'd need to move all the window content into a template for it to work in Vision

1 Like

with picture window, i will still see live values from the source picture.

I think the suggestion to make use of templates makes sense - although I don't think this will be the ideal solution, since it means I will have a set of templates for each picture that I want to have.
It would be nice though, if this feature is available. it will help in migrating wincc pages across to ignition.
thanks all.

Could be improved in a bunch of ways, but:

if event.propertyName == "componentRunning":
	from javax.swing import JLabel, ImageIcon
	from com.jidesoft.popup import JidePopupFactory
	from com.inductiveautomation.ignition.client.util.gui import MouseAdapterEx
	
	class PreviewMouseAdapter(MouseAdapterEx):
		def __init__(self, target):
			self.popup = None
			self.target = target
	
		def mouseEntered(self, mouseEvent):
			self.popup = JidePopupFactory.getSharedInstance().createPopup()
			self.popup.contentPane = JLabel(self._getPreview())
			system.util.invokeLater(self._updatePreview, 100)
			self.popup.showPopup(mouseEvent.getXOnScreen(), mouseEvent.getYOnScreen(), event.source)
			
		def _getPreview(self):
			image = system.print.createImage(self.target)
			return ImageIcon(image)
			
		def _updatePreview(self):
			if self.popup is not None:
				self.popup.contentPane.icon = self._getPreview()
				system.util.invokeLater(self._updatePreview, 100)
			
		def mouseExited(self, mouseEvent):
			if self.popup is not None:
				self.popup.hidePopup()
				
	PreviewMouseAdapter(
		target = system.gui.getWindow("test").rootContainer
	).install(event.source)	

Kapture 2023-03-06 at 11.03.55

12 Likes

9 Likes

Greatest movie ever created!