propertyChange event when window change it size

Hi all,

I’m trying to trigger some script (propertyChange) when main window change size.
My problem is to find the name of window property that changed.
There is property “Size”, but it do not work when I try to filter event ( if event.propertyName == “size” ).
I know that property “Size” is not numeric type, and I am wondering is it possible to fire propertyChange event when window change it size?

Any help/examples would be greatly appreciated.

Cheers
falko

Try this script and see if you can find the property:

print "Property::" + event.propertyName + " | " + str(event.oldValue) + " => " + str(event.newValue)

I tried that code, but it will give me Property::size, only when I activate script with window.size = (width, height).

To be precise, I am looking for some trigger which will activate certain script when ignition window is stretch or shrink (for example Resize the window using mouse drag)

Add a component listener to the window:
stackoverflow.com/questions/2303 … size-event
docs.oracle.com/javase/tutorial/ … tener.html

Best,

Hi nick,
Do you think :scratch: we can use these listener to prevent a popup windows to be dragged outside the visible screen boundary ?
We dont like when the main windows is resized when a popup windows is dragged outside the down of the ignition main windows…

Hi,
Yes, I think something like that could be done to prevent the popup from being moved outside the visible screen boundary.

Best,