Module but - Buttons in Local Memory

The module but (button module) is the program interface to DataView-Buttons. With these functions, you can create, modify and delete buttons in local memory. Buttons can be of the following types in DataView:

Buttons are - just as items in menus - summarized in button areas. Button areas are invisible, virtual objects. They can be state-dependently associated with other objects, as for example with a mask. The result of this association is the display of the buttons within the mask. Number and position of buttons within the mask are not restricted. If userexit functions are defined for buttons, these are executed when the button is activated.

A button area is clearly described in local memory by the following attributes:

In contrast to menus, there is no event loop for buttons. Buttons can always be activated if the object associated with the button area (e.g. the mask) is active.


Important functions

dal_but_ret_act
standard function for reading the Id of the last activated button.

dal_but_ret_buf, dal_but_set_buf
fills or returns the entry in the user-configurable button buffer.

dal_but_map_but
Outputs a button area in local memory at a screen position which must be specified.

dal_but_hid_but, dal_but_del_but
Removes a button area from the screen or deletes it completely out of local memory.

dal_but_loc_sel, dal_but_fre_loc, dal_but_chk_loc
Locks or unlocks a button or checks for locking.

dal_but_chk_but
Checks whether a button area exists in local memory.


Functions must be used with great care

dal_but_cre_but, dal_but_cre_sel, dal_but_res_but
Only create a button area with all corresponding attributes in local memory if the definition of the buttons depends on variables only known at runtime. In all other cases you should interactively design the menu as data object and create it with standard functions dal_dmi_cre_but from the data base.