Saltar para o conteúdo principal
Versão: Próximo

VP SET BORDER

VP SET BORDER ( rangeObj : Object ; borderStyleObj : Object ; borderPosObj : Object )

ParâmetroTipoDescrição
rangeObjObject->Objeto intervalo
borderStyleObjObject->Objeto que contém o estilo da borda
borderPosObjObject->Object containing border placement

Descrição

The VP SET BORDER command applies the border style(s) defined in borderStyleObj and borderPosObj to the range defined in the rangeObj.

In rangeObj, pass a range of cells where the border style will be applied. If the rangeObj contains multiple cells, borders applied with VP SET BORDER will be applied to the rangeObj as a whole (as opposed to the VP SET CELL STYLE command which applies borders to each cell of the rangeObj). If a style sheet has already been applied, VP SET BORDER will override the previously applied border settings for the rangeObj.

The borderStyleObj parameter allows you to define the style for the lines of the border. The borderStyleObj supports the following properties:

PropriedadeTipoDescriçãoValores possíveis
colortextDefine a cor da margem. Predefinição = black.Sintaxe da cor CSS "#rrggbb" (sintaxe preferencial), sintaxe da cor CSS "rgb(r,g,b)" (sintaxe alternativa), nome da cor CSS (sintaxe alternativa)
styleIntegerDefine o estilo da borda. Predefinição = vazio.
  • vk line style dash dot
  • vk line style dash dot dot
  • vk line style dashed
  • vk line style dotted
  • vk line style double
  • vk line style empty
  • vk line style hair
  • vk line style medium
  • vk line style medium dash dot
  • vk line style medium dash dot dot
  • vk line style medium dashed
  • vk line style slanted dash dot
  • vk line style thick
  • vk line style thin
  • You can define the position of the borderStyleObj (i.e., where the line is applied) with the borderPosObj:

    PropriedadeTipoDescrição
    allbooleanEstilo de linha de fronteira aplicado a todas as fronteiras.
    leftbooleanEstilo de linha de fronteira aplicado à fronteira esquerda.
    topbooleanEstilo de linha da borda aplicado à borda superior.
    direitabooleanEstilo de linha de fronteira aplicado à fronteira direita.
    bottombooleanEstilo da linha de fronteira aplicado à fronteira inferior.
    outlinebooleanEstilo da linha de fronteira aplicado apenas às fronteiras exteriores.
    insidebooleanEstilo da linha de fronteira aplicado apenas às fronteiras interiores.
    innerHorizontalbooleanEstilo de linha da borda aplicado apenas às bordas horizontais interiores.
    innerVerticalbooleanEstilo da borda aplicado apenas a bordas verticais interiores.

    Exemplo 1

    Este código produz uma borda à volta de todo o intervalo:

    $border:=New object("color";"red";"style";vk line style thick)
    $option:=New object("outline";True)
    VP SET BORDER(VP Cells("ViewProArea";1;1;3;3);$border;$option)

    Exemplo 2

    This code demonstrates the difference between VP SET BORDER and setting borders with the VP SET CELL STYLE command:

    // Set borders using VP SET BORDER
    $border:=New object("color";"red";"style";vk line style thick)
    $option:=New object("outline";True)
    VP SET BORDER(VP Cells("ViewProArea";1;1;3;3);$border;$option)

    // // Set borders using VP SET CELL STYLE
    $cellStyle:=New object
    $cellStyle.borderBottom:=New object("color";"blue";"style";vk line style thick)
    $cellStyle.borderRight:=New object("color";"blue";"style";vk line style thick)
    VP SET CELL STYLE(VP Cells("ViewProArea";4;4;3;3);$cellStyle)

    Veja também

    VP SET CELL STYLE