IDRILL_METHOD
Perform drilldown button processing
WTSupported in traditional Synergy on Windows
|
WNSupported in Synergy .NET on Windows
|
USupported on UNIX
|
VSupported on OpenVMS
|
subroutine IDRILL_METHOD a_inpinfo ,a a_inprec ,a a_methoddata1 ,any . . a_methoddata20 ,any
Arguments
a_inpinfo
The structure of input information. (a)
a_inprec
The data_area argument (or data_location argument for I_INPFLD on Windows) passed to the calling input routine. (a)
a_methoddata1 through a_methoddata20
(optional) Up to 20 additional data arguments. (any)
Discussion
IDRILL_METHOD is a subroutine you write and name when you want your program to perform extra actions when a drilldown button is pressed (on Windows) or the I_DRILL menu entry is signaled for a specific input field.
This subroutine is called by I_INPUT, I_INPFLD, and L_INPUT when a drill method is specified for the current field being processed. You can specify a drill method for the current field by using the DRILL_METHOD qualifier in a .FIELD script command or the D_FLD_DRILL option in I_FLDMOD or IB_FIELD.
On Windows, if a drill method is specified for a field, a drilldown (“…”) button is placed to the right of the field. If the user left-mouse clicks on the drilldown button, the associated drill method is invoked.
If a menu entry I_DRILL is placed on a menu column and the user selects the menu entry while processing a field that has an associated drill method, the drill method is invoked.
Your drill method can be used for a number of things. Primarily, it is used for some form of lookup or presentation of additional information. Your subroutine can use I_FORCE or I_DSPFLD to return data back into the field being processed. If the default type for the field is COPY, any change you make to the data area will affect the default value for the field.
The inpinf.def file defines a_inpinfo. See IARRIVE_METHOD for information.
A_inprec is the record passed to the data_area argument for I_INPUT and L_INPUT and, on Windows, the data_location argument for I_INPFLD. (On UNIX and OpenVMS, this argument is not passed if I_INPFLD is the calling routine.)
A_methoddata1 through a_methoddata20 are up to 20 additional optional arguments that can be passed to I_INPUT, I_INPFLD, or L_INPUT. They are passed, in turn, directly to IDRILL_METHOD. This enables you to communicate additional information to IDRILL_METHOD.
Invocation of a drill method behaves just like selecting a menu entry. Therefore, any leave method for the current field will be invoked first. To determine if a leave method is being invoked due to a drilldown, test g_select for true (non-zero) and g_entnam for “I_DRILL” in the leave method.
See also
- Overloading UI Toolkit routines for more information on creating this subroutine
- Appendix D: Methods for important information on using methods
Examples
.field name, a30, pos(1, 2), prompt("Name"), fpos(1, 15), drill_method("mydrill")
Given the above field definition, the following drill method, mydrill, displays data to the name field.
subroutine mydrill ; ; Description: Display data to a field when the drilldown button is ; pressed. This drill method will display the field name for ; the field that had its drilldown button pressed. ; ; Arguments: .include "WND:inpinf.def" ;Input information a_inprec ,a ;Input record .include "WND:tools.def" record fldnam ,a30 proc fldnam = %i_getstring(inp_wndid, inp_fldnam) xcall i_next(inp_wndid, "*CURR*", fldnam) xcall i_force(fldnam) xreturn endsubroutine