Push Buttons in Masks (NoSelect-, Select-, Edit Button Area)

Push Buttons in masks are implemented with the help of virtual button areas. These button areas are not visible themselves and always have the size of the mask. You can create NoSelect-, Select- and Edit button areas. In lists the buttons of the NoSelect button area always refer to the entire list object and the buttons of the Select button area refer to one or several selected records in the list. In forms there can be only one button area, for any displayed records is considered as selected and, thus, there is no difference between NoSelect- and Select state. The Edit button area contains the context buttons for mask-edit state both in lists and in forms.


NoSelect Buttons in Lists

The NoSelect button area in lists should contain buttons referring to the entire list object or to all data in the list, e.g. search records (iwf_sel_lis), insert records (iwf_ins_elm), print all records displayed (pri_wdg), etc.

You link a button area with the NoSelect state of a list by entering the button area name in the Mask Data form, field Button/Nos. If the list is a self-created copy of a default list, this replaces the default NoSelect button area BUTTON_NOS automatically entered by DataView.

Attention! If a list is to contain buttons, it must always be linked to both the Select- and the NoSelect button area. Linking to only one of both button areas is not possible.


Select Buttons in Lists

The select button area in lists should contain buttons referring to one or several selected records, e.g. edit record (iwf_edt_lis), delete record (iwf_del_lis), display additional data for a record in a separate form (z.B. iwf_frm_typ), etc.

You link a button area with the Select state of a list by entering the button area name in the Mask Data form, field Button/Sel. If the list is a self-created copy of a default list, this replaces the default Select button area BUTTON_SEL automatically entered by DataView.

Attention! If a list is to contain buttons, it must always be linked to both the Select- and the NoSelect button area. Linking to only one of both button areas is not possible.


Buttons in Forms

The form button area can contain buttons referring to both all data in the form and to the displayed record only, i.e. NoSelect and Select functions simultaneously. You can use for instance NoSelect functions, such as Search (iwf_sel_lis), Insert (iwf_ins_elm), Print (pri_wdg), and Select functions, such as Edit (iwf_edt_lis), Delete (iwf_del_lis), display dependent elements in a separate refine list (iwf_lis_ref), etc.

You link a button area with a form by entering the button area name in the Mask Data form, field Button/Nos. If the form is a self-created copy of a default form, this replaces the default form menu BUTTON_FRM automatically entered by DataView.

Note! For the special case that no record remains visible in the form you may want to display Select buttons (e.g. Edit, Delete) visible, but inactive. To do so, you can distribute the buttons to NoSelect- and Select button areas and link both button areas to the mask (cf. -> Visibility and Availability of Push Buttons in Masks).


Edit Buttons for Lists and Forms

The Edit button area provides buttons for mask-edit state. It must contain buttons that close the different modes of mask-edit state:

Additionally, Edit button areas can contain additional buttons, e.g. for comfortable data editing, such as maximizing the field size (evt_cal_mac, parameter @POP-FIELD), cut-, copy- and paste-functions (cch_cal_mac, parameter CUT, COPY or PASTE) or delete field contents (evt_cal_mac parameter @CLEAR-FIELD), etc. You should always call the required event-macros with the auxiliary userexit evt_cal_mac and any required client-macros with the auxiliary userexits cch_cal_mac.

Please note that from Edit Button Areas menus you`re not allowed to invoke interactive widgets (iwf_lis_..., iwf_frm...), a graphical browser (iwf_brw_ent) or any userexit`s which would activate Mask-Edit state a second time (e.g. iwf_edt_lis, ...).

To avoid the necessity to create an individual Edit button area for each mode of the mask-edit state you can control for each contained button in which mode it is to be available. This is controlled via the button name:

Button name Availability of the Button
name only in all modes
Name@I in insert-mode only
Name@U in update-mode only
Name@Q in query-mode only
Name@V in view-mode only
Name@IU e.g. only in insert- and update-mode (other combinations also possible)

You link a button area with the mask-edit state of a mask by entering the button area name in the Mask Data form, field Button/Edt. If the mask is a self-created copy of a default mask, this replaces the default form button area BUTTON_EDT automatically entered by DataView.


Inheritance of Edit Button Areas

If you use lists or forms without any Edit button area as sub-masks in combined forms, the Edit button area defined for the header form will be automatically inherited to the sub-mask. The Edit buttons are not automatically positioned in the icon bar of the sub-mask, but keep their position in the header form. They remain executable if the sub-mask is active.


Positioning Push Buttons in Masks

In lists only the icon bar area is reserved for holding buttons. Row position and row length are limited to the value 1.

Buttons in forms can be freely positioned. It is useful, however, to define the preferred positions for buttons and forms to simplify interaction with the program for the user.

In combined forms it must be observed that header form buttons are not positioned in the index card area if there are any sub-lists there.

Buttons within a button area may not overlap.


Visibility and Availability of Push Buttons in Masks

Push buttons in masks can have the following states with regard to their visibility and availability:

The state the buttons have depends on the current state of the mask. The following rules apply:

In Lists List in
NoSel State
List in
Sel State
List in
MasEdt State
Push Buttons of the
NoSel Button Area
visible/active invisible invisible
Push Buttons of the
Sel Button Area
invisible visible/active invisible
Push Buttons of the
Edit Button Area
invisible invisible visible/active

In Forms Form in
Widget State,
No Record Displayed
Form in
Widget State,
Record Displayed
Form in
MasEdt State
Push Buttons of the
NoSel Button Area
visible/active visible/active invisible
Push Buttons of the
Sel Button Area
visible/inactive visible/active invisible
Push Buttons of the
Edit Button Area
invisible invisible visible/active

In combined Forms Header Form Active Sub-Mask Active
Push Buttons in the
Header Form
(All Button Areas)
Visibility according to the rules for forms Visibility according to the rules for lists or for forms (depending on sub-mask), all visible/active buttons are displayed visible/inactive
Push Buttons in
Sub-Mask
(All Button Areas)
Visibility according to the rules for forms, all visible/active buttons are displayed visible/inactive Visibility according to the rules for lists or for forms (depending on sub-mask)

Note! The state-dependent visibility of push buttons allows the definition of several buttons at one mask position. However, each push button must be assigned to a different button area. Thus you can create the impression that a button changes its function if the user shifts the mask into another state.