ShowFormInDialog() options - disable close box

It would be wonderful if we could make the dialog with this function a (movable) modal window.

I like to use this feature for windows with, for example, an OK and Cancel button.

the formDialog is modal and moveable.
and you can put ok and cancel buttons in the form to get the dialog you want..

jcompagner:
the formDialog is modal and moveable.
and you can put ok and cancel buttons in the form to get the dialog you want..

I guess you are technically right.
Can you give me control over the close button as well then? I don’t want a user to be able to close the window without using any of my predefined buttons.

Thanks :)

I must agree here with Robert.

Let’s say you want to do a validation on leaving a form (that we entered with showFormOnDialog). We would leave the form with (or without) ok and cancel etc. buttons. But we can still click away the form via the close box.

We can ‘attach’ a method to the ‘onHide’ event but even when you give a focus to an element with a validation error the form closes when we used the close box.

in the next beta release onHide on a form can return a false to stop the dialog from closing.

This feature is also now available on the main panel (so normal forms) if the onhide of the current showing form returns false then it won’t switch to another form.

Great Johan, thanks…