Creating a wizard-style form
A wizard is a form that steps you through specific sections using Next and Back buttons. Here we will show you how to design a form which will do exactly that.
How to do it...
Add a frame to the form.
Set the following properties on the textbox:
Property
Value
ShowCaption
No
Name
Frame1
Add a label to the frame with the caption "Frame 1".
Set the following properties on the Label:
Property
Value
Caption
Frame 1
Copy the frame and paste two copies of it on the form.
Change the labels in the new frames to be Frame 2 and Frame 3.
Change the
Name
properties of the frames toFrame2
andFrame3
respectively.Your form should look like the one shown in the following screenshot:
Add four buttons to the form beneath Frame 1. The name and caption properties on each should be Back, Next, Finish, and Cancel respectively.
Add the following code to the
OnOpenForm
trigger:CurrForm.Frame1.XPOS := 0; CurrForm.Frame1.YPOS := 0; CurrForm.Frame2.XPOS := 0; CurrForm...