Question

How do you enable a double-click (or double-tap) on a subfile row in Wings or Monarch?

Answer

ASNA Wings/Monarch has an optional feature that enables selecting a subfile row by double-clicking it with the mouse on desktop browsers and with a double-tap on touch-enabled mobile devices. When a row is double clicked, you cause two things to happen:

  1. You can specify the name of a field to be modified when the row is double-clicked (with the subfile controller's DblClickTargetField property). The subfile controller's DblClickTargetValue sets the value that is assigned to the field specified with the DblClickTargetField property.

  2. You can optionally specify a key press to be "pushed" to submit the page. This value is specified with the subfile controller's DblClickKey property. This is generally the Enter key, but you can select any of the key values provided.

These two options work to effectively provide a shortcut for selecting a row and applying a default against the row.

To enable a subfile row double-click:

  1. Find the field name you want to use for the DblClickTargetField. This is generally the field used to display subfile row options, as shown in Figure 1a below. Select the field in the design-time display and press F4 to show its properties. The Alias shows the field's name.

    Figure 1a. Find the field name you want to use as the double click target field.

    As shown by the green-screen DDS is figure 1b below, the SFSEL field has a value specified with the Values keyword. In this case, the 2 option is the Edit option and that is the value to assign to the SFSEL field.

    Figure 1b. The original green-screen DDS showing the SFSEL field and its Values keyword.

  2. With the field identified (SLSEL in this case), display the subfile's controller (the DdsSubfileControl) properties and set these three properties:

    • DBLClickKey. Set this to the keypress to be "pushed" when the row is double-clicked.
    • DBLClickTargetField. Set this to the field for which you want a value set.
    • DBLClickTargetValue. Set this to the value to assign to the field identified in the DblClickTargetField property.

In Figure 2 below, you can see that when the subfile row is double-clicked a 2 is assigned to field SFSEL and the Enter key is pushed—causing the record's edit panel to be displayed.

Figure 2. The subfile controller's DoubleClick properties.

Additional information
Product/Platform: Wings and Monarch