4D View v16PV SET CELL PROPERTY |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
4D View v16
PV SET CELL PROPERTY
|
PV SET CELL PROPERTY ( area ; coluna ; linha ; propriedade ; valor ) | ||||||||
Parâmetro | Tipo | Descrição | ||||||
area | Inteiro longo |
![]() |
Área 4D View | |||||
coluna | Inteiro longo |
![]() |
Número da coluna da célula | |||||
linha | Inteiro longo |
![]() |
Número de linha da célula | |||||
propriedade | Inteiro longo |
![]() |
Número da propriedade | |||||
valor | Inteiro longo |
![]() |
Valor da propriedade | |||||
O comando PV SET CELL PROPERTY fixa o valor da propriedade da célula definida pelos parâmetros coluna e linha.
Para definir o parâmetro propriedade, pode utilizar:
A seguinte lista descreve as diferentes constantes utilizadas no parâmetro propriedade e os valores associados:
Constante | Tipo | Valor | Comentário |
pv cell height | Inteiro longo | 101 |
|
pv cell width | Inteiro longo | 100 |
|
Constante | Tipo | Valor |
pv style automatic word wrap | Inteiro longo | 33 |
pv style based on | Inteiro longo | 4 |
pv style color back even | Inteiro longo | 11 |
pv style color back odd | Inteiro longo | 12 |
pv style color minus even | Inteiro longo | 17 |
pv style color minus odd | Inteiro longo | 18 |
pv style color text even | Inteiro longo | 13 |
pv style color text odd | Inteiro longo | 14 |
pv style color zero even | Inteiro longo | 15 |
pv style color zero odd | Inteiro longo | 16 |
pv style format alpha | Inteiro longo | 6 |
pv style format bool | Inteiro longo | 8 |
pv style format date time | Inteiro longo | 9 |
pv style format forced text | Inteiro longo | 32 |
pv style format num | Inteiro longo | 7 |
pv style format picture | Inteiro longo | 10 |
pv style hidden | Inteiro longo | 1 |
pv style hor alignment | Inteiro longo | 29 |
pv style locked | Inteiro longo | 0 |
pv style rotation | Inteiro longo | 31 |
pv style spellcheck | Inteiro longo | 2 |
pv style text bold | Inteiro longo | 22 |
pv style text condensed | Inteiro longo | 27 |
pv style text extended | Inteiro longo | 28 |
pv style text face | Inteiro longo | 21 |
pv style text font | Inteiro longo | 19 |
pv style text italic | Inteiro longo | 23 |
pv style text outline | Inteiro longo | 25 |
pv style text shadow | Inteiro longo | 26 |
pv style text size | Inteiro longo | 20 |
pv style text underline | Inteiro longo | 24 |
pv style use picture height | Inteiro longo | 3 |
pv style vert alignment | Inteiro longo | 30 |
Nota: Para definir, em uma seleção, a propriedade de uma faixa de células, pode utilizar o comando PV SET RANGE PROPERTY.
Buscamos todas as células que contém uma fórmula que faz referencia a célula D20, para passar a bloquear ou desbloquear elas.
C_LONGINT($ProtectedCell) `Para bloquear ou desbloquear as células
C_LONGINT($EndColumn;$EndRow) `Para guardar os limites inferior/direita
C_LONGINT($StartColumn;$StartRow) `Para guardar os limites superior/inferior
C_LONGINT($Column;$Row) `Para os laços nas coordenadas
ARRAY LONGINT($LeftTab;0)
ARRAY LONGINT($UpperTab;0)
ARRAY LONGINT($RightTab;0)
ARRAY LONGINT($LowerTab;0)
PV FIND ALL(Area;"$D$20";0;0) `Células que contém "$D$20"
`Coordenadas das células selecionadas
PV GET SELECTED RANGES LIST(Area;$LeftTab;$UpperTab;$RightTab;$LowerTab)
If(Size of array($LeftTab)#0) `Há fórmulas que correspondam ao critério de pesquisa?
SORT ARRAY($LeftTab;$UpperTab;$RightTab;$LowerTab;>)
$StartColumn:=$LeftTab{1} `Recuperação da célula mais a esquerda
SORT ARRAY($UpperTab;$LeftTab;$RightTab;$LowerTab;>)
$StartRow:=$UpperTab{1} `Recuperação da célula mais acima
SORT ARRAY($RightTab;$UpperTab;$LeftTab;$LowerTab;>)
$EndColumn:=$RightTab{Size of array($RightTab)} `Recuperação da célula mais a direita
SORT ARRAY($LowerTab;$RightTab;$UpperTab;$LeftTab;>)
$EndRow:=$LowerTab{Size of array($LowerTab)} `Recuperação da célula mais abaixo
`Revisamos a seleção
For($Column;$StartCol;$EndCol)
For($Row;$StartRow;$EndRow)
If(Position("$D$20";PV Get cell formula(Area;$Column;$Row))>0)
`Bloqueado?
$ProtectedCell:=PV Get cell property(Area;$Column;$Row;pv style locked)
`Mudança de bloqueado/desbloqueado
PV SET CELL PROPERTY(Area;$Column;$Row;pv style locked;Num($ProtectedCell=0)) `0 <-> 1
End if
End for
End for
End if `Faixa(s) selecionadas?
PV Get cell property
PV Get range property
PV SET RANGE PROPERTY
Produto: 4D View
Tema: PV Propriedade de célula
Número
15927
Modificado: 4D View 2004
4D View Linguagem ( 4D View v16)