DriveWorks Pro 15: How To: Create In Form Navigation (KB13120302) [send feedback...]

Introduction

Standard navigation buttons can be replaced with Macro Buttons on each user form.

Macro Buttons have the advantage of being able to use an image for each of the properties:

  • Picture
  • Picture (Hover)
  • Picture (Pressed)

Using Macro buttons as Navigation button on the user form is known as In Form Navigation.

Create a Specification Macro

As the navigation buttons are macro buttons Specification Macros will be required to navigate to the required forms.

Using the Navigate Forward task we can advance the In Form Navigation.

  1. Open the project in DriveWorks Administrator and go to Stage 5: Specification Control> Specification Macros.
  2. Click Add and enter a name for the macro.
    Use a name that relates to the purpose of the macro.

    For example:

    Next Form

  3. With the macro highlighted in the Macros list find the task Navigate Forward in the Toolbox and drag it to the Tasks column.
More Specification Macros

You will need a Specification Macro to return to the previous form. Repeat the above steps and create a macro using the Navigate Backward task.

Use a name like Previous Form for the macro.

Add a Macro Button

The Specification Macro can now be applied to a Macro button on the user form.

  1. Go to Stage 2: User Interface> Form Design, and select the form the button is to be added to.
  2. Select the Macro Button from the command bar, and enter a name for the control.
  3. With the control selected on the user form select the Macro Name property from the property list. Click the Build button to open the Rule Builder.
  4. Click the Macros.. button from the command bar of the rule builder. Select the macro (created above) from the Macros.. dialog. Click OK.
  5. Click OK in the Rule Builder to apply the Macro Name.
More Macro Buttons

Repeat the above steps for each navigation button required, and on each form you have.

Form Controls can be copied and pasted between user forms.

Turn Standard Navigation Off

We recommend keeping Standard Navigation on during testing of In Form Navigation.

Once In Form Navigation has been tested Standard Navigation can be turned off.

  1. Click on the user form (not on a control).
  2. In the properties list select the Show Standard Navigation property and select False.
  3. Repeat steps 1 and 2 for all forms in your project.

Add More...

The steps above create basic Navigation button. In reality you will require more buttons that make use of Macros with appropriate tasks applied.

The appearance of a Macro Button can resemble anything you prefer by using the available control properties.

The following discusses how this can be achieved.

Button Appearance

The Macro Button has some properties that will make the appearance of your navigation buttons more appealing:

  • Background Color - When using a transparent image the background color can be set.
  • Text - When using text on your button change this property to reflect the action it will perform.
  • Text Color - Use a color that is easily readable against the background of the button.
  • Font - When using text the font size and style can be set.
  • Picture - Change appearance from a button to whatever you like with a picture.
  • Picture (Hover) - Use different pictures for different mouse events.
  • Picture (Pressed) - Use different pictures for different mouse events.
  • Picture Size Mode - Re-size the picture to suit the size of the control.
  • Picture Style - Set if the button is to use text, a picture or a combination.

Other Navigation Buttons and Tasks

You may require navigation buttons that perform other tasks on the specification. The chart below outlines how to replicate other buttons include in standard navigation.

ButtonSpecification Macro Task RequiredNotes
CancelCancel SpecificationWill cancel the current specification and return the user to the Specification Explorer.
SaveUse the Invoke Specification Transition task to transition the specification to a paused or automatic State.Ensure the paused state exists in your Specification Flow and it can be transitioned back to a running state.
The Default Specification Flow contains a Saved state that can be used to construct your own.
StoreUse the Store Specification task to store the current values entered onto the form.Unlike the Invoke Specification Transition task this will not exit out of the current specification.
SkipUse the Skip To Form task to skip to a form.Ensure any critical data on the bypassed forms can still be navigated to.


Knowledge Base Article Ref:KB13120302

Table of Contents