EAGLE Help

dlgRedisplay()


Function
Redisplays the dialog after changing values.

Syntax
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 all dialog objects are automatically updated after leaving the statement.

See also dlgReset, dlgDialog, A Complete Example

Example

string Status = "Idle";
int Result = dlgDialog("Test") {
               dlgLabel(Status, 1); // note the '1' to tell the label to be updated!
               dlgPushButton("+OK")    dlgAccept(42);
               dlgPushButton("Cancel") dlgReject();
               dlgPushButton("Run") {
                 Status = "Running...";
                 dlgRedisplay();
                 // some program action here...
                 Status = "Finished.";
                 }
               };

Index Copyright © 2005 CadSoft Computer GmbH