Cancel
Showing results for 
Search instead for 
Did you mean: 

Call a method when a dialog window is moved

Legend
Legend

Hello,
I need to call a method when a dialog window is moved. Is it possible?

This because when I open the model I open the dialog window which covers all the screen. The user should't be able to move the window visualizing what is hidden below.

Regards
Alessio

4 REPLIES 4

Re: Call a method when a dialog window is moved

Legend
Legend

Yes it is possible. 

 

open the dialog window-->tools menu-->edit controls-->move in frame

 

in the move in frame reference the method you want to call. 

Sachin

Re: Call a method when a dialog window is moved

Legend
Legend
Hello,
thank you for your reply.

What you suggest triggers the method when you move the dialog object: I need to call the method when the window of the dialog is moved (and after that I would also need to read the old coordinate to bring it back to the old position).

If is not possible how can I create the behaviour described in the first post?

Re: Call a method when a dialog window is moved

Siemens Phenom Siemens Phenom
Siemens Phenom

It is not possible to watch the window coordinates.

What you can do is read of the window coordinates using 'getXYWH' in a close control, and you can then move the window using 'setXYWH'.

_________________________________________________________________
Did you like the answer? Then click the Thumbs Up button.
Did the answer solve your problem? Then accept the answer as solution.

Re: Call a method when a dialog window is moved

Legend
Legend
Ok, that's enough since I know the original coordinates.
The problem is still how to trigger the method at the right time.