Reputation: 1581
When I close the Form appear this DialogBox
I need to get the action clicked in this dialog (for example Yes or No etc...) in Form's method canClose In debug the last point is in:
\Forms\MyForm\Methods\canClose
ret = super();
How I can get the clicked choice?
Thanks in advice.
Upvotes: 1
Views: 2291
Reputation: 18051
You cannot get the answer from the prompt.
The return value of super
is true, if the user can leave the form.
You do not describe what you want to achieve, but "No" is the answer to your question.
The prompt comes when a value in the record is change and the users press the Esc key. If the user selects Yes, the write
method is called. So you may set a flag canClose
and then test it in write
. But I honestly not see the reason why this would be useful.
Upvotes: 1
Reputation: 7627
Check some lookup and dialog forms.
They uses closeOk
, closedOk
, closeCancel
and closedCancel
methods.
There are also closeSelect
and closeSelectRecord
methods to assign selected record (check also selectMode
method on the form).
Upvotes: 1