So far i am able to OpenClose the DialogBox and determine which button is pushed ("Ok" or "Cancel") by adding label with Dialog.SelectedButton.Label.
But I cannot figure out how to let my IF (Dialog.SelectedButton.Label="Ok", SaveData) code wait for user input. It now acts on the current value in stead of using the value the user is yet to choose.
Note : an alternative is building a confirmation dialog myself and putting code behind both buttons (OnSelect Ok-button : SaveData) and OnSelect of Cancel-button: Reset data. My question is more related to how to use the standard component distributed by MS.
Just FYI, that control is not "standard" at all. It's one of the new customizable components that can be added.
I haven't looked at this specific control, but if you can edit the OnSelect for that control's "OK" button (or whatever you changed the name to be) then it is best to do your save there. That's the best way to do it.
An alternative would of course to have a Timer that has it's Start event = to whatever value gets returned/set when the Dialog button is pressed, but that's a little convoluted.