Skip to main content
shark
Associate III
Feb 22, 2020 1:38 PM UTC
Solved

How to wait for modal window's return value

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.
Martin KJELDSEN
Martin KJELDSENBest answer
Principal III
Feb 24, 2020 8:24 AM UTC

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
Feb 24, 2020 8:24 AM UTC

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.