B_BUTTONSET

Define the placement of a set of buttons on a window or tab set

WSupported on Windows

 

 

 

xcall B_BUTTONSET(container_id, [placement], [per_row_col], [justification]
&     [, button_name])

container_id

The ID of the window or tab set. (n)

placement

(optional) One of the following: (n)

DSB_BOTTOM

The set of buttons will be placed horizontally along the bottom of the container with a maximum of per_row_col buttons per row. (default)

DSB_RIGHT

The set of buttons will be placed vertically along the right side of the container with a maximum of per_row_col buttons per column.

per_row_col

(optional) The maximum number of buttons to place on a row if DSB_BOTTOM is specified, or on a column if DSB_RIGHT is specified. The default behavior is to display as many buttons as will fit and wrap to the next row or column. (n)

justification

(optional) One of the following: (n)

DSB_BEGIN

The buttons will be left-justified if DSB_BOTTOM is specified, or positioned towards the top if DSB_RIGHT is specified. (default)

DSB_CENTER

The buttons will be centered along the designated side.

DSB_END

The buttons will be right-justified if DSB_BOTTOM is specified, or positioned towards the bottom if DSB_RIGHT is specified.

button_name

(optional) The name of the default button or “*NONE*” to clear explicitly set button default for the window. (The latter must be uppercase and enclosed in quotation marks.) (a)

B_BUTTONSET defines the placement of a set of buttons within a window or tab set. (Use the L_BUTTONSET subroutine to define a button set on a list.)

If button set information is specified for a container that already has a button set, any new information will supersede the previous information, but unspecified arguments will not be modified.

Every button is contained within a set, and only one button set is allowed per window or tab set. Because of this, a call to B_BUTTONSET affects all buttons within a container.

If the E_STATE option D_RETURNBTN is set, the default button will be selected if you press Enter, no matter what field you’re on in the window. If button_name is not specified, the first button in the window is the default.

This routine has no effect on applications running on Unix or OpenVMS or in Synergy .NET. It does, however, save button information on these platforms, so if the window is saved to a window library (by using U_SAVE) and later loaded from that library on a Windows platform in traditional Synergy, the button will be on the window (assuming ISAM-compatible platforms).

The following example places the window’s buttons on the right side of the window, centered, with at most three buttons per column.

xcall b_buttonset(wndid, DSB_RIGHT, 3, DSB_CENTER)