LogiView

Function 'widget_id'

     

This function returns the ID of the current widget.

In case of mask action triggers in the modes "Delete" or "Rollback" the 'widget_id' function possibly does not return the ID of the Trash-Widget (this occurs if the userexit "wdh_del_tra" is called from within LogiView or if the trash basket is emptied using the shortcut SHIFT + DEL).

In these cases a C userexit must be written in order to determine the Widget ID of the Trash Widget. If this is not possible, you should check whether the widget_name (widget_id({"SRC"|"DST"}) is "TRASH". Only under these circumstances it is possible to perform further actions without problems.

widget_id_trash
 

Syntax:

 

{INT_VAR}= widget_id() or
{INT_VAR}= widget_id({"SRC"|"DST"})

 

I/O parameters:

{"SRC"|"DST"} Specificies if the ID of the source widget ("SRC") or the target widget ("DST") is displayed when using Drag&Drop.
-  
 

Return value:

 
{INT_VAR}

The following values are returned:

Parameter Drag&Drop Action Other Actions
SRC ID of source widget ID of current widget
DST ID of target widget 0
In the edit mode, the source and target widget have different IDs when using Drag&Drop, otherwise the ID of the source widget is the same as the ID of the current widget and the ID of the target widget is "0".
In connection with the parameters SRC and DST this function returns the estimated value only in the Edit-Action-Trigger of the target widget, however, not in other action userexits of this maks or source widget!
 

Example:

  Declaration of Variables
 
10 put(strprint("widget_id_src:%i, name

:%s",widget_id("SRC"),widget_name(widget_id("SRC"))))   

20 put(strprint("widget_id_dst:%i, name

:%s",widget_id("DST"),widget_name(widget_id("DST"))))  

Functions and commands: Editing Masks