Skip to main content

BorderColors Property

Customizes the colors of an SRP ActiveX Control's border.

Definition​

Property "OLE.BorderColors" as Record

Values​

This property has the following record structure:

PosNameTypeDescriptionDefault
<1, 1>Normal Border Outer ColorColor FillThe outermost color at rest."3DShadow"
<1, 2>Normal Border Inner ColorColor FillThe innermost color at rest."Window"
<2, 1>Focused Border Outer ColorColor FillThe outermost color when focused."3DShadow"
<2, 2>Focused Border Inner ColorColor FillThe innermost color when focused."Window"
<2, 1>Hot Border Outer ColorColor FillThe outermost color when hovered."3DShadow"
<2, 2>Hot Border Inner ColorColor FillThe innermost color when hovered."Window"
<2, 1>Disabled Border Outer ColorColor FillThe outermost color when disabled."3DShadow"
<2, 2>Disabled Border Inner ColorColor FillThe innermost color when disabled."Window"

Remarks​

The BorderColors property sets the colors for the control when its Border property has been set to Custom Thick or Custom Thin. If it is a Custom Thick border, then the border is 2-pixels wide and you can set the outer pixels and inner pixels independently. If it is a Custom Thin border, then only the outer pixel color is used and the inner color is ignored. You are not limited to solid colors. Each border can be set to a valid ColorFill string, so you can even apply gradients.

Example​

// Set the control's border to be a thick custom one
Set_Property(@Window:".OLE_CONTROL", "OLE.Border", "Custom Thick")

// Now define the custom colors
Colors = ""
Colors<1> = "Green"   :@VM:"Window"   ; // Normal State
Colors<2> = "Green"   :@VM:"Green"    ; // Focus State
Colors<3> = "Green"   :@VM:"Green"    ; // Hot State
Colors<4> = "3DShadow":@VM:"3DFace"   ; // Disabled State

// And set them
Set_Property(@Window:".OLE_CONTROL", "OLE.BorderColors", Colors)

See Also​

Border