Command PV GET CELL CONTROL

4D View

PV GET CELL CONTROL

version 6.8


PV GET CELL CONTROL (area; column; row; type; varName; method; title)

ParameterTypeDescription
areaLongint4D View area
columnLongintCell column number
rowLongintCell row number
typeIntegerControl type
varNameStringName of control management variable
methodStringCallback method name
titleStringControl title

Description

The PV GET CELL CONTROL command gets information about the "control" displayed in the cell set by column and row inside the 4D View area.

A control is a button, check box, radio button, drop-down list or combo box type object contained in a cell.

type indicates the control type (among the five listed above) contained in the cell. To set this parameter, use the PV Control constants theme.

varName returns the name of the variable associated with the control (name of the array containing the values to display for drop-down list and combo box control types).

method contains the name of the callback method linked to the control.

title contains the label of the button, check box, etc.

Example

The following method fills the cells that are below a control with the description of the latter:

   C_LONGINT($Column;$Row)  `Coordinates of "controlled" cell
   C_INTEGER($CtrlType)  `Control type
   C_STRING(32;$CtrlName)  `Name of control
   C_STRING(32;$CallbackMethod)  `CallbackMethod name
   C_STRING(32;$Title)  `Control title
   C_STRING(32;$TypeName)  `Control type name

   PV GET CURRENT CELL (Area;$Column;$Row)  `Controlled cell
   PV GET CELL CONTROL (Area;$Column;$Row;$CtrlType;$CtrlName;$CallbackMethod;$Title)

   Case of
      : ($CtrlType=0)
         $TypeName:="No control"
    
      : ($CtrlType=pv control push button )
         $TypeName:="button"
    
      : ($CtrlType=pv control radio button )
         $TypeName:="radio button"
    
      : ($CtrlType=pv control check box )
         $TypeName:="check box"
    
      : ($CtrlType=pv control drop down )
         $TypeName:="drop-down list"
    
      : ($CtrlType=pv control combo box )
         $TypeName:="combo box"
   End case

   PV SET CELL TEXT VALUE (Area;$Column;$Row+1;"Type: "+$TypeName)
   PV SET CELL TEXT VALUE (Area;$Column;$Row+2;"Name: "+$CtrlName)
   PV SET CELL TEXT VALUE (Area;$Column;$Row+3;"Title: "+$Title)
   PV SET CELL TEXT VALUE (Area;$Column;$Row+4;"Method: "+$CallbackMethod)

See Also

PV Get cell value type, PV SET CELL CONTROL.

Constants

PV Control theme.