4D v13PV SET CELL PROPERTY |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
4D View v13
PV SET CELL PROPERTY
|
PV SET CELL PROPERTY ( area ; column ; row ; property ; value ) | ||||||||
Parameter | Type | Description | ||||||
area | Longint |
![]() |
4D View area | |||||
column | Longint |
![]() |
Cell column number | |||||
row | Longint |
![]() |
Cell row number | |||||
property | Longint |
![]() |
Property number | |||||
value | Longint |
![]() |
Property value | |||||
The PV SET CELL PROPERTY command sets the value of the property defined in the column and row parameters.
To define property, you can use:
The following list describes the different constants used in the property parameter and the associated values:
Constant | Type | Value | Comment |
pv cell height | Longint | 101 | Allows setting of cell height. Associated values: height expressed in pixels. |
pv cell width | Longint | 100 | Allows setting of cell width. Associated values: width expressed in pixels |
Constant | Type | Value | Comment |
pv style automatic word wrap | Longint | 33 | Allows enabling the automatic word wrap function when the contents of a cell exceed its width. Associated values: constants of the PV Style values theme.
|
pv style based on | Longint | 4 | The cell uses, as a model, the style sheet whose number is passed in the value parameter. Associated values: style sheet numbers or constants of the PV Style special values theme. |
pv style color back even | Longint | 11 | Allows setting of the cell background color if it is located on an even-numbered line. Associated values: color numbers (see the PV RGB to color and PV Index to color commands) or pv value none (PV Style values theme) to set no color. |
pv style color back odd | Longint | 12 | Allows setting of the cell background color if it is located on an odd-numbered line. Associated values: color numbers (see the PV RGB to color and PV Index to color commands) or pv value none (PV Style values theme) to set no color. |
pv style color minus even | Longint | 17 | Allows setting of cell text color if it is located on an even-numbered line and its value is negative. Associated values: color numbers (see the PV RGB to color and PV Index to color commands). |
pv style color minus odd | Longint | 18 | Allows setting of cell text color if it is located on an odd-numbered line and its value is negative. Associated values: color numbers (see the PV RGB to color and PV Index to color commands). |
pv style color text even | Longint | 13 | Allows setting of cell text color if it is located on an even-numbered line. Associated values: color numbers (see the PV RGB to color and PV Index to color commands). |
pv style color text odd | Longint | 14 | Allows setting of cell text color if it is located on an odd-numbered line. Associated values: color numbers (see the PV RGB to color and PV Index to color commands). |
pv style color zero even | Longint | 15 | Allows setting of cell text color if it is located on an even-numbered line and its value is 0 (zero). Associated values: color numbers (see the PV RGB to color and PV Index to color commands). |
pv style color zero odd | Longint | 16 | Allows setting of cell text color if it is located on an odd-numbered line and its value is 0 (zero). Associated values: color numbers (see the PV RGB to color and PV Index to color commands). |
pv style format alpha | Longint | 6 | The cell uses the text display format whose number is passed in the value parameter. Associated values: display format numbers. |
pv style format bool | Longint | 8 | The cell uses the Boolean display format whose number is passed in the value parameter. Associated values: display format numbers. |
pv style format date time | Longint | 9 | The cell uses the date and time display format whose number is passed in the value parameter. Associated values: constants of the PV Style format date time theme.
Note: Depending on your current System settings, the resulting display can be different. |
pv style format forced text | Longint | 32 | Allows “forcing” the cell display in raw text, i.e. without the automatic display format applied by 4D View based on the cell contents (number, date, text, etc.). Associated values: constants of the PV Style values theme.
|
pv style format num | Longint | 7 | The cell uses the number display format whose number is passed in the value parameter. Associated values: display format numbers. Note: Default display format numbers correspond to their position in the menu used for selecting formats in the cell Format dialog box. |
pv style format picture | Longint | 10 | Allows definition of the picture display format associated with the cell. Associated values: constants of the PV Picture mapping mode theme.
|
pv style hidden | Longint | 1 | Allows setting of cell locking and hiding. Locked and hidden cell contents are not displayed and can no longer be modified, selected, etc. Associated values: constants of the PV Style values theme.
|
pv style hor alignment | Longint | 29 | Allows setting of horizontal alignment of cell content. Associated values: constants of the PV Style values theme.
|
pv style locked | Longint | 0 | Allows setting of locking for the cell user. Locked cell contents can no longer be modified, selected, etc. Associated values: constants of the PV Style values theme.
|
pv style rotation | Longint | 31 | Allows setting of cell content rotation. Associated values: constants of the PV Style values theme.
|
pv style spellcheck | Longint | 2 | Allows application of spellcheck for the cell. Associated values: constants of the PV Style values theme.
|
pv style text bold | Longint | 22 | Allows setting of Bold for the cell text. Associated values: constants of the PV Style values theme.
|
pv style text condensed | Longint | 27 | Allows setting of Condensed for the cell text. Associated values: constants of the PV Style values theme.
|
pv style text extended | Longint | 28 | Allows setting of Extended for the cell text. Associated values: constants of the PV Style values theme.
|
pv style text face | Longint | 21 | Allows setting of cell style sheet. Associated values: style sheet numbers or constants of the PV Style special values theme. |
pv style text font | Longint | 19 | Allows setting of cell font. Associated values: font numbers (see the PV Add font and PV GET FONT LIST commands). |
pv style text italic | Longint | 23 | Allows setting of Italic for the cell text. Associated values: constants of the PV Style values theme.
|
pv style text outline | Longint | 25 | Allows setting of Outline for the cell text. Associated values: constants of the PV Style values theme.
|
pv style text shadow | Longint | 26 | Allows setting of Shadow for the cell text. Associated values: constants of the PV Style values theme.
|
pv style text size | Longint | 20 | Allows setting of cell font size. Associated values: size in pixels. |
pv style text underline | Longint | 24 | Allows setting of Underline for the cell text. Associated values: constants of the PV Style values theme.
|
pv style use picture height | Longint | 3 | Allows adapting of cell size according to the picture height associated with it. Associated values: constants of the PV Style values theme.
|
pv style vert alignment | Longint | 30 | Allows setting of vertical alignment of cell content. Associated values: constants of the PV Style values theme.
|
Note: To define, in one selection, the property of a range of cells, you can use the PV SET RANGE PROPERTY command.
Find all cells containing a formula which refers to cell D20, in order to switch between locking and unlocking them.
C_LONGINT($ProtectedCell) `To lock or unlock cells
C_LONGINT($EndColumn;$EndRow) `To save lower/right limits
C_LONGINT($StartColumn;$StartRow) `To save upper/left limits
C_LONGINT($Column;$Row) `To get coordinates in loop
ARRAY LONGINT($LeftTab;0)
ARRAY LONGINT($UpperTab;0)
ARRAY LONGINT($RightTab;0)
ARRAY LONGINT($LowerTab;0)
PV FIND ALL(Area;"$D$20";0;0) `Cells containing "$D$20"
`Selected cell coordinates
PV GET SELECTED RANGES LIST(Area;$LeftTab;$UpperTab;$RightTab;$LowerTab)
If(Size of array($LeftTab)#0) `Are there formulas corresponding to search criteria?
SORT ARRAY($LeftTab;$UpperTab;$RightTab;$LowerTab;>)
$StartColumn:=$LeftTab{1} `Get left-most cell
SORT ARRAY($UpperTab;$LeftTab;$RightTab;$LowerTab;>)
$StartRow:=$UpperTab{1} `Get upper-most cell
SORT ARRAY($RightTab;$UpperTab;$LeftTab;$LowerTab;>)
$EndColumn:=$RightTab{Size of array($RightTab)} `Get right-most cell
SORT ARRAY($LowerTab;$RightTab;$UpperTab;$LeftTab;>)
$EndRow:=$LowerTab{Size of array($LowerTab)} `Get lowest cell
`Review the selection
For($Column;$StartCol;$EndCol)
For($Row;$StartRow;$EndRow)
If(Position("$D$20";PV Get cell formula(Area;$Column;$Row))>0)
`Lock?
$ProtectedCell:=PV Get cell property(Area;$Column;$Row;pv style locked)
`Switch locked/unlocked
PV SET CELL PROPERTY(Area;$Column;$Row;pv style locked;Num($ProtectedCell=0)) `0 <-> 1
End if
End for
End for
End if `Range(s) selected?
Product: 4D
Theme: PV Cell property
Number:
15927
Modified: 4D View 2004
PV Get cell property
PV Get range property
PV SET RANGE PROPERTY