# Wizard flow A VCL program with a three-page `TAtlasWizard` built in code: - Page 1 (Project) asks for a project name. `OnValidate` vetoes Next while the name is empty and says why in the status line above the wizard. - Page 2 (Options) has a check box. - Page 3 (Summary) shows the answers, refreshed by `OnPageChanged`, and a Restart button that calls `Restart`. - `OnFinish` reports the result once; after that Back and Next stay disabled until Restart. `OnCancel` closes the window. ## Build and run Open `WizardFlow.dpr` in Delphi 13; the IDE creates the project file. Add the Atlas VCL `src` folder and the `shared` folder to the project's search path, then build and run for Win32 or Win64. No packages need to be installed. The `shared` folder is part of the sample download. It holds `Atlas.TestVcl.pas`, which the optional snapshot mode uses to save a picture of the window. The program is interactive. `WizardFlow.exe wizard.png` paints the first page off screen, saves it as a PNG and exits. ## Expected output A 640 × 460 window with "Page 1 of 3" at the top, the prompt and an empty edit box, and the footer buttons Back (disabled), Next and Cancel. 1. Press Next with the box empty: nothing moves and the status reads "Enter a project name before continuing." 2. Type a name and press Next: "Page 2 of 3". Back returns to page 1 without validation. 3. On page 3 the button reads Finish and the summary says, for example, `Create "Atlas" without a notification.` Press Finish: the status starts with "Finished:" and Back and Next are disabled. 4. Press Restart: page 1 again, with the name still filled in. 5. Cancel closes the window at any point. ## What to change first - Add a page by calling `AddPage` and parenting your controls to the returned `TTabSheet`; the Next button reads Finish on whichever page is last. - Put your own checks in `Validate`, keyed by `PageIndex`. Show your own message: the wizard only stays on the page. - Do the real work in `Finished`, for example set `ModalResult := mrOk` when the form is shown with `ShowModal`.