11.5 closequery()

This function closes a dialogbox (a window with the attribute .dialogbox set to true) by setting the .visible attribute to false. Furthermore, this function sets a return value for the dialogbox.

Definition

void closequery
(
  anyvalue RetVal input
)

Parameters

anyvalue RetVal input
This parameter specifies the return value that the function querybox() shall return.

Notes

The function closequery() should only be used, when the dialogbox has been opened with the function querybox().

The parameter ShipEvent of the querybox() function controls, whether a changed event for .visible is triggered for the dialogbox.

Example

dialog D

window Box
{
  .dialogbox true;
  .visible   false;
  .title     "Enter password";

  edittext E
  {
    .format "S";
  }

  pushbutton P
  {
    .text "OK";

    on select
    {
      closequery(E.content);
    }
  }
}

window WnLogin
{
  child pushbutton PbLogin
  {
    .text "Login";

    on select
    {
      if (querybox(Box) <> "password") then
        exit();
      endif
    }
  }
}