BorderGetColor

Syntax

Color.l = BorderGetColor(Border, *LeftColor.Long=#Null, *LeftOpacity.Float=#Null, *TopColor.Long=#Null, *TopOpacity.Float=#Null, *RightColor.Long=#Null, *RightOpacity.Float=#Null, *BottomColor.Long=#Null, *BottomOpacity.Float=#Null)

Description

Retrieves the color and opacity values for the sides of a generated border object. This command is only applicable to borders created with CreateBorder().

Parameters

Border
The handle of the generated border object.

*LeftColor.Long (optional)
A pointer to a Long variable to receive the color value of the left border side.

*LeftOpacity.Float (optional)
A pointer to a Float variable to receive the opacity value (0.0 to 1.0) of the left border side.

*TopColor.Long (optional)
A pointer to a Long variable to receive the color value of the top border side.

*TopOpacity.Float (optional)
A pointer to a Float variable to receive the opacity value (0.0 to 1.0) of the top border side.

*RightColor.Long (optional)
A pointer to a Long variable to receive the color value of the right border side.

*RightOpacity.Float (optional)
A pointer to a Float variable to receive the opacity value (0.0 to 1.0) of the right border side.

*BottomColor.Long (optional)
A pointer to a Long variable to receive the color value of the bottom border side.

*BottomOpacity.Float (optional)
A pointer to a Float variable to receive the opacity value (0.0 to 1.0) of the bottom border side.

Return Value

Returns the color value (Long) of the left border side. Returns 0 or #False if the border handle is invalid or not a generated border.

Remarks

This function allows retrieving the individual color and opacity settings for each side of a generated border.

Example

IncludeFile "ProGUI_PB.pbi"

StartProGUI()

MyBorder = CreateBorder(#PG_Border_Solid, 5, 10, RGB(255, 0, 0), 0.8)
BorderSetColor(MyBorder, RGB(0,255,0), 1, RGB(0,0,255), 1, RGB(0,255,255), 0.5, RGB(255, 255, 0), 0.1)

If MyBorder
  BorderGetColor(MyBorder, @LCol, @LOpa.f, @TCol, @TOpa.f, @RCol, @ROpa.f, @BCol, @BOpa.f)
  Debug "Left Color: " + Hex(LCol) + ", Opacity: " + StrF(LOpa)
  Debug "Top Color: " + Hex(TCol) + ", Opacity: " + StrF(TOpa)
  Debug "Right Color: " + Hex(RCol) + ", Opacity: " + StrF(ROpa)
  Debug "Bottom Color: " + Hex(BCol) + ", Opacity: " + StrF(BOpa)

  FreeBorder(MyBorder)
EndIf

StopProGUI()

See Also

CreateBorder, BorderSetColor, BorderGetWidth, BorderGetRadius, BorderGetFlags

Supported OS

Windows, Linux