PFC Guide Titlebar
HomeFAQLinksPFCMAGExtensionsDownloadWhat's NewSearch

Wizard Template

Ver. 1.00
Contributed by Chris Gross



What

Wizard Template

Why

To enhance your PowerBuilder GUI and stay consistent with the MS feel.

How

The wizard template is made up of two PFC based objects. The base wizard window, w_wizardmaster, and the base wizard step, u_wizardstepmaster. These objects work together much like the PFC objects u_tab and u_tabpage. To create a wizard you need to create a window inherited from w_wizardmaster. Then create a visual userobject inherited from u_wizardstepmaster for each step in your wizard. Now in the window you’ve inherited from w_wizardmaster, add to the pfc_preopen event a call to of_addstep() for each step you’ve created. At this point you have successfully created your wizard. The following tables describe each function and event in w_wizardmaster and u_wizardstepmaster, showing where to code step validation logic and how to create a wizard with a dynamic number and order of steps.

 

w_wizardmaster

Functions

Arguments

Description

of_AddStep String Class name of the step Add a steps to the end of the wizard.
of_DeleteStep Integer Number of the step to delete Removes a step.
of_InsertStep Integer Insert before this step number

String Class name of the step

Inserts a step.
of_registerstep String Class name of the step OBSOLETE. Use of_AddStep.
of_removelaststep (None) OBSOLETE. Use of_DeleteStep.
of_reregisterstep String Class name of step

Integer Step number

OBSOLETE. Use a combination of of_DeleteStep and of_InsertStep.

Events

Arguments

Description

wizard_finish (None) This event is triggered when a user clicks the ‘Finish’ button (after the pre-navigation events are triggered).
wizard_loadstep Integer Step number Used internally by the base class.
wizard_navigate String "Next","Back","Finish" Used internally by the base class.
wizard_postnavigate String "Next","Back","Finish" This event is triggered after a new step is opened. This event is intended for you to extend.
wizard_prenavigate String "Next","Back","Finish" This event is triggered before a new step is opened. Extend this event to add your step validation logic. You may prevent the next step from opening by returning the appropriate value.

 

 

u_wizardstepmaster

Events

Arguments

Description

wizardstep_postdraw (None) This event is triggered after the step is opened and drawn on the window. Extend this event to add an code you wish to execute after the user sees the new step. For example, initiate a datawindow retrieve.
wizardstep_predraw (None) This event is triggered after the step is opened but before it is drawn on the window. This event is intended for you to set initial or saved values for controls on your step.
wizardstep_prenavigate String "Next","Back","Finish" This event is triggered before a new step is opened. Extend this event to add your step validation logic. You may prevent the next step from opening by returning the appropriate value.

 


Download the About the extension contributor

 

Revision History
10/25/1998 The 'Finish' button has been removed. The 'Next' button now morphs to the 'Finish' button during the last step.

The old API for w_wizardmaster has been changed in favor of a more intuitive API. The old API still exists, therefore any old implementation of the wizard template will still work. The new API consists of

  • of_AddStep()
  • of_InsertStep()
  • of_DeleteStep()

The u_wizardstepmaster event 'wizardstep_predraw' now works appropriately, i.e. it is triggered before the step is drawn on the wizard.

Ver. 1.01
07/07/1998 Initial Revision Ver. 1.00

Interested in contributing material to this web site? Send an email to submit@pfcguide.com, but don't forget to check the contribution guidelines first.


For information or suggestions about this web site please contact webmaster@pfcguide.com

PFCGuide is sponsored by Dynamic Technology Group.
The information on this site is provided for advice only and not to be considered a contract or a liability against Dynamic Technology Group.

Last Revised: February 15, 2004 03:58 AM.