We can use (CanClose) in FormCloseQuery

We can use (CanClose) in FormCloseQuery
Can we use it somewhere else? for example I forbid the user to close the form until he something special after then I allow him to close it

Comments

  1. You cannot use it somewhere else, but you can use it exactly as you want to.
    Simply have a field in your form (eg. FSomeSpecialUserActionHappened: Boolean;) - initialize the field with false. Assign the true value to this field if the user performed the special action. In FormCloseQuery check the value of the field and if it is still false set CanClose to false.
    That way you achieve what you want.

    ReplyDelete

Post a Comment