Skip to main content
shark
Associate III
February 22, 2020
Solved

How to wait for modal window's return value

  • February 22, 2020
  • 1 reply
  • 754 views

A message box based on modal window widget with 2 buttons, one is ok, the other is cancel.When any button is clicked, modal window is hide and return the button value to the caller.

Can it be implemente in someway so it can be called like this?

int retValue = MessageBox(...);

Otherwise I have to fill callback fuction into the message box to get return result.

This topic has been closed for replies.
Best answer by Martin KJELDSEN

Hi, you can't do it like that - At least not in a non-convoluted way (e.g. A modal window might not always have a button, but will open and close based on a signal from the backend).

Callbacks is the way to go.

1 reply

Martin KJELDSEN
Martin KJELDSENBest answer
Principal III
February 24, 2020

Hi, you can't do it like that - At least not in a non-convoluted way (e.g. A modal window might not always have a button, but will open and close based on a signal from the backend).

Callbacks is the way to go.