DriveWorks Pro 15: Form Design [send feedback...]

Form Design

The form designer is where you will administer the controls you want displayed on each of your forms. It provides you with a great deal of flexibility in the way that controls are displayed due to its support for X/Y positioning for all form controls, and control over fonts, colors, and more.

The main areas of the form designer are:

  • The alignment command group on the command bar
  • The toolbox command group on the command bar
  • The form design area
  • The forms list - displays all forms and their controls within the project.

    The forms list can be be filtered by using the filter at the top of the list.

    Please see the topic How To Use Filters for more advanced filtering information.

  • The property grid - displays all properties for the selected control.

The Property Grid

If you click on a control, the property grid changes to show all of the properties of that control, and their current values, the image below shows an example of the property grid for a text box:

The property grid is made up of the following areas:

  • Two buttons which toggle between categorized and alphabetical views
  • Two columns, property names on the left, and property values on the right.
  • A description of the currently selected property.

User Form Properties

Properties for each User Form can be set by clicking on the form in Form Design mode.

These include:

  • Background Color - Sets the background color of the user form.
  • Default Font - Sets the default font to use for all controls placed on the form.
  • Show Standard Navigation

    The Standard Navigation buttons found at the bottom of the user form during specifying are turned off with the Show Standard Navigation property.

    Standard Navigation buttons look like the image below:

    Customizable "In Form" navigation can be created using Macro buttons with appropriate Specification Tasks associated to them.

    Before turning Standard Navigation off be sure your alternative navigation works as expected.

    Please refer to the article How To: Create In Form Navigation for more information.

    Show Standard Navigation is a user form property.

    To display the properties of a user form click in any blank space on the user form in the form designer.

    User form properties must be set for each user form in the project.
  • Show Task List - Determines if the Task List that displays Form Messages is shown during specification
  • On Enter - Allows a Specification Macro to be selected to run when the user form is loaded.
  • On Next - Allows a Specification Macro to be selected to run when the user form transitions to the Next form.
  • On Previous - Allows a Specification Macro to be selected to run when the user form transitions to the Previous form.
  • (Tag) - Allows an alternative name or description for the user form to be entered.

Examples

Show Standard Navigation Property ValueResult
TrueWill use the standard navigation buttons.
FalseWill not use the standard navigation buttons.

Resolution Guides

Resolution Guides help you to design user forms within a specified boundary.

These are particularly useful when designing your user forms for use on a common device.

There are a number of preset resolution guides available, these are:

  • iPhone 5 Portrait
  • iPhone 5 Landscape
  • iPhone 2/3 Portrait
  • iPhone 2/3 Landscape

The width and height of the presets match the screen resolution of the products they are named after, these can be adjusted on creation.

Add a Resolution Guide

To add a Resolution Guide:

  1. Select Form Design from Stage 2: User Interface.
  2. Click the Add resolution guide button.

  3. Enter a Name, Width and Height for the guide or select from the list in the Templates drop down.

  4. Click Create. The resolution guide will be applied to all user forms.

Edit a Resolution Guide

To edit a Resolution Guide:

  1. Right click on either the start or end node of the guide.

  2. Select Edit from the menu.
  3. Make the required changes in the Edit resolution guide dialog.

Delete a Resolution Guide

To delete a Resolution Guide:

  1. Right click on either the start or end node of the guide.

  2. Select Delete from the menu.

Form Controls

Add a Form control to a User Form

To create a new form control:

  1. Make sure that a form is selected in the forms list
  2. Click the toolbox entry for the type of control you want to create.
  3. Give the control a name.
  4. Click "OK"

DriveWorks Pro Form Control Types

The form controls that DriveWorks Pro supports are:

TypeIconDescription
3D Preview BoxA control in which an interactive 3D Model can be displayed during specification.
Check BoxA control which allows a user to toggle between TRUE/FALSE.
Child Specification ListA list used to support nesting of specifications inside other specifications.
Combo BoxA list of data presented as a drop-down.
Data GridThis control has been superseded with the Data Table control.
Data TableA table of selectable data retrieved from a data source.
Date PickerA control that allows a date to be selected from an interactive calendar.
Dialog ButtonProvides support for launching a dialog to show information to the user, and ask for input.
Frame ControlA control in which any user form, within the project can be displayed.
HyperlinkProvides a clickable link to a URL.
Item ListA list of data created/edited using dialogs.
LabelProvides a way of displaying fixed or dynamic text on a form.
List BoxA list of options from which the user can select a single item.
Macro ButtonProvides support for running a macro in the design master when clicked.
Measurement Text BoxProvides support for entering linear dimensions in a variety of units.
Numeric Text BoxA text box which only supports numeric input within a fixed or dynamic range of values.
Option ButtonA single option, in the form of radio buttons, from which the user can select a single item. Option Buttons can be grouped outside a frame and across different forms.
Option GroupA list of options grouped within a single frame, in the form of radio buttons, from which the user can select a single item.
Picture BoxA control which can display a picture whose path can either be a fixed value, or the result of a rule.
SliderA horizontal or vertical bar with an indicator that can be dragged to represent a numeric unit.
Specification HostA control that allows you to host a Specification or a Child Specification.
Spin ButtonA control which supports numeric input within a fixed or dynamic range of values, and with buttons that increment or decrement the value of the control by a certain amount.
Text BoxA control which supports textual input.
Upload ControlA control that allows a client side file to be uploaded.
Web FrameA control that allows external web content to be rendered onto a user form.

Form Control Properties

Each form control has many properties that can be set or have rules applied that dynamically change the property during specification.

Fixed and Active properties

When a control is added to the user form and selected various properties become available in the property grid. All control properties have the following possible states:

  • Fixed - Fixed properties set certain behavioral properties or define the actual name of the control. These properties can only be changed in the form design stage.
  • Active - Active properties can be set to be one of the following states:
    • Dynamic - A property set to be dynamic gives the option to apply a rule to the property that will be evaluated during the running of a specification. This allows the property to change during specification. For example this could be a change to data in a list type control, the position of the control on the user form or if the control is visible or not. Dynamic properties applied by DriveWorks cannot be made static, but they do not necessarily require a rule.
    • Static - A static property, like a fixed property, is set during form design. Unlike fixed properties there is the option to make this dynamic. Static properties can be made dynamic.

All control properties can be used in rules. See How To: Reference Control Properties for more information.

Caption or Text property

The position of the caption in relation to the control differs between control types.

By default the caption takes the name given to the control when the control is created (not on renaming the control).

As control names cannot include spaces capitalized words are automatically separated with a space for the caption.

For example:

When the name shown in the image below is given to a control

The caption displayed will be:

Please Enter The Length

Static properties can only be changed to Dynamic properties on DriveWorks projects.

This functionality is not available for Microsoft Excel based projects.

For information on changing a static property to a dynamic property please see How To: Change A Static Property To A Dynamic Property.

Set the value of a dynamic property

  1. With the user form active in the form design area select the control that is to have its value set.
  2. Locate and select the dynamic property in the property grid
  3. Click the button that appears to the right of the property value.
  4. This launches the rules builder from which the value can be set.

Set the value of a fixed or static property

  1. With the user form active in the form design area select the control that is to have its value set.
  2. Locate and select the property in the property grid.
  3. The selected property value can be changed by swiping over the current value and entering the new value or
  4. Selecting the drop down box to the right of the property value and selecting the new value from the list of options.

Control Guides

Control guides allow quick and accurate alignment of controls when designing user forms.

Control guides appear when controls are moved on the user form.

Control Guides align to other controls in 2 ways:

  • Margin Guides - Snap a set distance away from another control.
  • Alignment Guides - Snap to the edges of another control.

Control Guides can also snap to any Resolution Guide in use on the user form.

Adjust Control Guide Settings

Control Guides settings allow the following properties to be changed to suit your preferences.

  • Enable/ Disable.
  • Margin and Alignment Guide Color.
  • Snap Range.

Group Controls

Form Controls can be grouped so they move as one when repositioning is required.

To Group Controls

Controls can be grouped by:

  1. Select 2 or more controls from the same user form.
  2. Right click on one of the selected controls.
  3. Select Group Controls from the menu.

To Ungroup Controls

Controls can be ungrouped by:

  1. Select a group of controls from the user form.
  2. Right click on the group.
  3. Select Ungroup Controls from the menu.

Keyboard Control Positioning

Accurate Positioning of Form Controls Using Keyboard Arrows.

For fine tuning of control positions the keyboard arrow keys can be used move the selected control 1 pixel at a time.

  1. Select a single control or multiple controls to be moved.
  2. Press and hold the Alt key on the keyboard and the arrow key that corresponds to the direction the control is to be moved.
    • Alt + - Move the control(s) 1 pixel up.
    • Alt + - Move the control(s) 1 pixel left.
    • Alt + - Move the control(s) 1 pixel down.
    • Alt + - Move the control(s) 1 pixel right.

Multi-Selection of Controls

Multiple form controls can be selected by the following methods:

  • Fence Selection - Click in a blank area of the form and drag a fence around the controls to be selected.
  • Ctrl or Shift Select - Select a control and then hold the Ctrl or Shift key down to select other controls.

When multiple form controls are selected from the form designer all properties that are shared between the controls will be displayed in the property list.

Also if any properties have the same value or rule, this will be displayed in the property list.

Aligning Form Controls

Testing a Form

You can use the "Test" button on the command bar to try out your form, and to set default values for controls.

DriveWorks Tech Tips Portal

Frame Control

The Frame control displays a box in which any user form, within the project, can be displayed, which can be used to create tabs which display different forms when clicked.

View all Tech Tips

DriveWorks Tech Tips Portal is available to DriveWorks Pro customers with an active subscription and support contract.

Tech Tips provide cut down projects that highlight specific functionality for faster and more effective learning.

To access the portal:

  1. Go to https://hub.driveworks.co.uk/tech-tips/
  2. Login with your DriveWorks Pro account credentials, if asked
  3. Click the Visit Tech Tips Portal button for access

The portal provides a search facility, start typing the name of the Tech Tip (as indicated above) to display the Tip you require.

Table of Contents