Syntax
Success = BorderSetWidth(Border, LeftWidth.d, TopWidth.d, RightWidth.d, BottomWidth.d)
Description
Sets the width (thickness) for each side of a generated border object. This command is only applicable to borders created with CreateBorder().
Parameters
Border
The handle of the generated border object.
LeftWidth.d
The width (in DIPs) for the left border side. Must be >= 0.
TopWidth.d
The width (thickness, in DIPs) for the top border side. Must be >= 0.
RightWidth.d
The width (in DIPs) for the right border side. Must be >= 0.
BottomWidth.d
The width (thickness, in DIPs) for the bottom border side. Must be
>= 0.
Note: Use #PG_Ignore for any width value you do not wish to change (though the
current implementation seems to always update if any value changes).
Return Value
Returns #True if the widths were successfully set, or #False if the border
handle is invalid or not a generated border.
Remarks
This function allows setting different thicknesses for each side of the border. Changing widths invalidates the border's rendering cache.
Example
IncludeFile "ProGUI_PB.pbi"
StartProGUI()
MyBorder = CreateBorder(#PG_Border_Solid, 5) ; Initial width 5 for all sides
If MyBorder
; Set top/bottom to 10 DIPs, left/right to 3 DIPs
If BorderSetWidth(MyBorder, 3, 10, 3, 10)
Debug "Border widths set successfully."
EndIf
FreeBorder(MyBorder)
EndIf
StopProGUI()
See Also
CreateBorder, BorderGetWidth, BorderSetColor, BorderSetRadius, BorderSetFlags
Supported OS
Windows, Linux