How to do it...

To create the state machine menu items, follow these steps:

  1. Add a new action menu item to the project named ConWHSVehInspStatusWaiting. Complete the property sheet as follows, in the order stated in the following table:

Property

Value

State Machine Data Source

ConWHSVehicleTable

State Machine Transition To

Waiting

Label

The label you use in the Waiting state's Label property

Help Text

The label you use in the Waiting state's Description property

Needs Record

Yes

  1. Create the menu items for the remaining states (InProgress and Complete) following the same pattern.
  2. Open the ConWHSVehicleTable form in the designer.
  3. Under the form's Design node, expand the ActionPaneHome control, and then ActionPaneActionButtonGroup. Right-click on this control and choose New | Menu Button.
  4. Rename the new control InspStatusMenuButton. Set the Text and Help Text properties to the same as we used on the state machine, for example, @ConWHS:InspectionStatus and @ConWHS:InspectionStatusHT respectively.
  5. Then, drag the three menu items onto this menu button. Set the Data Source property to ConWHSVehicleTable--the table that the state machine operates on.
  6. If you can't add them directly, drag them first onto the ActionPaneActionButtonGroup button group, and then drag them from there to the correct place.
  7. Save and close all code editors and design windows and build the project.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.116.67.212