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.
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 |