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:
-
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'sDblClickTargetValue
sets the value that is assigned to the field specified with theDblClickTargetField
property. -
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:
-
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. TheAlias
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 theValues
keyword. In this case, the2
option is theEdit
option and that is the value to assign to theSFSEL
field.Figure 1b. The original green-screen DDS showing the
SFSEL
field and itsValues
keyword. -
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.
Product/Platform: Wings and Monarch