4D View v16PV SET CELL NAME |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
4D View v16
PV SET CELL NAME
|
PV SET CELL NAME ( area ; column ; row ; name ; mode ) | ||||||||
Parameter | Type | Description | ||||||
area | Longint |
![]() |
4D View area | |||||
column | Longint |
![]() |
Cell column number | |||||
row | Longint |
![]() |
Cell row number | |||||
name | String |
![]() |
Cell name | |||||
mode | Longint |
![]() |
0 or omitted = Add the name, 1 = Replace the name | |||||
The PV SET CELL NAME command sets the name of a cell defined using the column and row parameters.
You can access a cell either by its absolute reference — column and row numbers — or its name. The 4D View area formulas can also refer to this cell using its name.
Notes:
The optional mode parameter is used to set the way the new cell name must be set if the cell already has one or more name(s). You can use the following constants of the PV Cell properties theme:
Constant | Type | Value | Comment |
pv add name | Longint | 0 | The new name is added to any names already set for the cell |
pv replace name | Longint | 1 | The new name replaces any names that have already been set for the cell. |
This example allows changing the name of the current cell. If it has already a name, the user can replace it:
C_TEXT($CellName) `Name to assign to cell
C_LONGINT($Column) `Column number of current cell
C_LONGINT($Row) `Row number of current cell
PV GET CURRENT CELL(Area;$Column;$Row) `Get current cell coordinates
$CellName:=PV Get cell name(Area;$Column;$Row) `Name possibly given already
If($CellName="") `The cell already has a name?
$CellName:=Request("What name do you want to assign to this cell?";"New name")
If($CellName#"") `A name was entered
PV SET CELL NAME(Area;$Column;$Row;$CellName) `Assign entered name
End if
Else `Current cell already has a name
CONFIRM("This cell is already named "+$CellName+". Do you want to rename it?";"Yes";"No")
If(OK=1) `The user wants to rename the cell
PV SET CELL NAME(Area;$Column;$Row;$CellName;pv replace name)
End if
End if
Product: 4D View
Theme: PV Cell property
Number:
15923
Modified: 4D View 2004.1
4D View Language ( 4D View v16)