EAGLE Help Light

dlgReject()

Funkce
Closes the dialog and rejects its contents.

Zápis
void dlgReject([ int Result ]);

Description
The dlgAccept function causes the dlgDialog to be closed and return after the current statement sequence has been completed.

Any changes the user has made to the dialog values will be discarded. The variables that have been given when the dialog objects were defined will be reset to their original values when the dialog returns.

The optional Result is the value that will be returned by the dialog. Typically this should be 0 or a negative integer value. If no value is given, it defaults to 0.

Note that dlgReject() does return to the normal program execution, so in a sequence like


dlgPushButton("Cancel") {
  dlgReject();
  dlgMessageBox("Rejecting!");
  }
the statement after dlgReject() will still be executed!

Calling dlgReject() implies a call to dlgReset().

Viz také dlgAccept, dlgReset, dlgDialog, A Complete Example

Příklad


int Result = dlgDialog("Test") {
               dlgPushButton("+OK")    dlgAccept(42);
               dlgPushButton("Cancel") dlgReject();
               };


OBSAH Translation © 2001 ELCAD v.o.s., Copyright © 2001 CadSoft Computer GmbH