4D v14.3Using standard actions |
||
|
4D v14.3
Using standard actions
Using standard actions
You can manage "selection" type list boxes by means of Standard actions associated with buttons or menus. For example, you can use the Add Subrecord standard action to add a new record to a table by means of a list box. This makes it easy to create modern interfaces based on list boxes. You can use three standard actions with list boxes: Add Subrecord, Edit Subrecord and Delete Subrecord. A button or a menu item associated with the Add Subrecord standard action is automatically enabled when there is at least one "selection" type list box in the form. If a form contains several list boxes, the action is applied to the one that has the focus (or, by default, to the frontmost one). When the user clicks on the button or selects the menu item, a new blank record appears in the detail form defined for the list box (see “Detail Form” in the List Box theme). The user can enter values, then validate the record and a new blank record automatically appears. This continues until the user clicks on the cancel button. If the data source for the list box is the current selection, all the records created are displayed in the list. A button or a menu item associated with the Edit Subrecord standard action is automatically enabled when there is at least one row selected in a "selection" type list box. When multiple rows are selected, the action is applied to the last row included in the selection. When the user clicks on the button or selects the menu item, the record corresponding to the list box row appears in the detail form defined for the list box (see “Detail Form” in the List Box theme). The user can modify the values, then validate or cancel the form in order to return to the list box. A button or a menu item associated with the Delete Subrecord standard action is automatically enabled when there is at least one row selected in a "selection" type list box. When multiple rows are selected, the action is applied to all the records. When a user clicks on the button or selects the menu item, a confirmation dialog box appears so that the user can confirm or cancel the deletion: |
PROPERTIES
Product: 4D SEE ALSO ARTICLE USAGE
4D Design Reference ( 4D v14 R2) |