EAGLE Help Light

dlgRedisplay()

Funkce
Redisplays the dialog after changing values.

Zápis
void dlgRedisplay(void);

Description
The dlgRedisplay function can be called to immediately refresh the dlgDialog after changes have been made to the variables used when defining the dialog objects.

You only need to call dlgRedisplay() if you want the dialog to be refreshed while still executing program code. In the example below the status is changed to "Running..." and dlgRedisplay() has to be called to make this change take effect before the "program action" is performed. After the final status change to "Finished." there is no need to call dlgRedisplay(), since the all dialog objects are automatically updated after leaving the statement.

Viz také dlgReset, dlgDialog, A Complete Example

Příklad


string Status = "Idle";
int Result = dlgDialog("Test") {
               dlgLabel(Status);
               dlgPushButton("+OK")    dlgAccept(42);
               dlgPushButton("Cancel") dlgReject();
               dlgPushButton("Run") {
                 Status = "Running...";
                 dlgRedisplay();
                 // some program action here...
                 Status = "Finished.";
                 }
               };


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