4D View v16

PV GET CELL CONTROL

Home

 
4D View v16
PV GET CELL CONTROL

PV GET CELL CONTROL 


 

PV GET CELL CONTROL ( area ; column ; row ; type ; varName ; method ; title ) 
Parameter Type   Description
area  Longint in 4D View area
column  Longint in Cell column number
row  Longint in Cell row number
type  Integer in Control type
varName  String in Name of control management variable
method  String in Callback method name
title  String in Control title

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_LONGINT($CtrlType//Control type
 C_TEXT($CtrlName//Name of control
 C_TEXT($CallbackMethod//CallbackMethod name
 C_TEXT($Title//Control title
 C_TEXT($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

 
PROPERTIES 

Product: 4D View
Theme: PV Cell value
Number: 15911

 
HISTORY 

Created: 4D View 6.8

 
ARTICLE USAGE

4D View Language ( 4D View v16)