![]() |
Creating Wizard Pages |
![]() |
|
Introduction |
|
A wizard page is a dialog box that is part of a suite usually used to create or configure something. If you have installed a printer using the Add Printer from the Printers folder, or if you have used applications such as Microsoft Access to create objects automatically, then you are quite familiar with wizard pages. A wizard (usually) starts by displaying a dialog that has at least a Next button. After performing an action and clicking Next, you are presented with another dialog or area displaying buttons such as Next and Back. These two buttons allow the user to navigate back and forth while performing a specific task. A more advanced wizard can display many other buttons than that. Such wizards display Back, Next, Finish, Close (or Cancel), and sometimes Help on the same dialog box. Property pages and wizard are easy to create in Borland Delphi. In MSVC, you <<must>> involve a class called CPropertySheet, then create dialog boxes based on the CPropertyPage class. Because Borland Delphi ships with so many controls, it provides various options to create wizards. The technique we are going to use here uses a simple logic. By dragging and dropping controls on a form, all you have to do is decide what control is visible when.
|
|
Dragging And Dropping Controls |
|
Borland Celphi ships with so many container controls we are going to use panels to carry controls relative to each page of our wizard. When other controls are placed on a panel, the panel acts as their parent. This means when the panel is not Enabled or Visible, the controls it hosts abide by the same property. |
|
|
Configuring the Wizard Pages |
|
The design of the form with its control was quite straightforward. To configure the pages, we will use the container ability of a panel. This will allow us to decide what panel to show and which one to hide, and when |
|