Wizard widget control
Abstract: Enabling completion of a wizard step has been shown as a fundamental feature in Dialog widgets – Wizard widget. More functions for controlling the presentation and sequence of wizard steps are introduced in this section.
Hint
A complete example can be found in ZEISS INSPECT App Examples – Workflow Assistants.
Step complete

Step complete: False

Step complete: True
DIALOG.wizard.step_set_complete(step_id, condition)
Enable completion of step
step_id
.
Step optional

Step optional, complete: False

Step optional, complete: True
DIALOG.wizard.step_set_optional(step_id, condition)
Set step
step_id
as optional.
Next step

Set ID of next step
DIALOG.wizard.step_set_next_id(step_id, next_id)
Set ID of next step – allows out-of sequence execution of steps.
Branch

Wizard step with a branch-button
DIALOG.wizard.step_set_branch_button_visible(step_id, condition)
Enable the branch-button.
DIALOG.wizard.step_set_branch_button_text(step_id, text)
Set the branch-button text to
text
(e.g. “Branch”).DIALOG.wizard.step_set_branch_id(step_id, branch_step_id)
Set the branch target step ID.
Final step

Step with finish-button
DIALOG.wizard.step_set_final(step_id, condition)
Set step
step_id
to a final step with finish-button. By default, the last step in the list is the final step.
Wizard events
Note
A dedicated event handler function for the Wizard widget is recommended.
The argument of the Wizard widget event is a dict with the following keys:
widget
The wizard widget
step
Current wizard step
type
Event type
"initialized"
– A new step has been reached.Do setup for the new wizard step here, e.g. change the selection.
"discarded"
– The current step has been discarded, either by the user navigating to the previous step or aborting the whole dialog. In the latter case a"discarded"
event for all previously completed steps will be emitted in reversed order.Do cleanup here, e.g., delete temporary elements or restore some selection.
"committed"
– The current step has been committed by the user.Finalize actions relevant to the step, e.g., create some (intermediate) element based on the current Dialog parameters.
"skipped"
– The current step has been skipped by the user.This can also be used to clean up, which may or may not be the same as for the discarded event.
"branched"
– The user has pressed the branch button.This may be the same as the committed event, but it may also trigger a different action especially if there is no branch ID set.
"id_changed"
– This is a general event when a the wizard step changes.This can be reacted to in place of the more detailed events above, e.g., if only the current id is needed to adjust your workflow.