Servoy 3.5.2: showFormInDialog() - problem

Parameter changes in the ‘showFormInDialog()’ function like , [y], [width], [height] values is only working after reopen the solution. Is this correct? I can reproduce this in Servoy 3.5.2 on Mac OS X 10.4.10 and Win XP Prof. SP2.

This is true. The following info is for smart client (web client size/position for dialogs works only partially, depending on dialog type…):

Those parameters are meant to be “initial” dialog bounds. So they will affect the dialog only the first time you open it. Then if you close/open it again, they are ignored. So, if you open a dialog at specified bounds, then move it, hide it and show it again, it will show at where the user dragged it last time - not at the initial specified bounds (this is what this behavior is for). Note that what I said before is true only if you use the same dialog (with the same specified name or with no specified name). We will change this in the docs - as it does not say they are only initial coordinates…

Anyway, in order to do what you need you can use application.setWindowLocation(…) and application.setWindowSize(…).

Another possibility - not recommended - would be to use showFormInDialog, with coordinates, but change the name of the dialog (not title) each time. But this way you would have lots of named windows laying around.

Thank you Andrei!
It’s nice to know that it is now a little complex to test the dialog forms ;-)