Saltar para o conteúdo principal
Versão: 20 R5 BETA

VP SET CELL STYLE

VP SET CELL STYLE ( rangeObj : Object ; styleObj : Object)

ParâmetroTipoDescrição
rangeObjObject->Objeto intervalo
styleObjObject->Objecto estilo

Descrição

The VP SET CELL STYLE command applies the style(s) defined in the styleObj to the cells defined in the rangeObj.

In rangeObj, pass a range of cells where the style will be applied. If the rangeObj contains multiple cells, the style is applied to each cell.

Borders applied with VP SET CELL STYLE will be applied to each cell of the rangeObj, as opposed to the VP SET BORDER command which applies borders to the rangeObj as a whole.

The styleObj parameter lets you pass an object containing style settings. Pode utilizar uma folha de estilos existente ou criar um novo estilo. If the styleObj contains both an existing style sheet and additional style settings, the existing style sheet is applied first, followed by the additional settings.

Para remover um estilo e reverter para as configurações de estilo padrão (se houver), passe um valor NULL:

  • giving the styleObj parameter a NULL value will remove any style settings from the rangeObj,
  • giving an attribute a NULL value will remove this specific attribute from the rangeObj.

For more information about style objects and style sheets, see the Style Objects paragraph.

Exemplo

$style:=New object
$style.font:="8pt Arial"
$style.backColor:="Azure"
$style.foreColor:="red"
$style.hAlign:=1
$style.isVerticalText:=True
$style.borderBottom:=New object("color";"#800080";"style";vk line style thick)
$style.backgroundImage:=Null //remove a specific attribute

VP SET CELL STYLE(VP Cell("ViewProArea";1;1);$style)

Veja também

VP ADD STYLESHEET
VP Font to object
VP Get cell style
VP Object to font
VP SET BORDER
VP SET DEFAULT STYLE