Skip to content

CornerShape

Determines how a single corner of a control is shaped. Used by Corner.Shape, which is set independently for each of the four corners of any control that exposes a Corners style object. The numeric value of the radius is supplied separately by Corner.Radius.

ConstantValueDescription
tbCurve0Quarter-circle round corner; the radius gives the curve.
tbNotched1Diagonal notch across the corner; the radius gives the cut depth.
tbCutOut2Inverse round-corner --- the corner area is carved out of the control.

Corners.SetAll applies one shape to every corner at once; setting TopLeft / TopRight / BottomLeft / BottomRight individually lets the shapes mix:

vb
With btnDemo.NormalState.Corners
    .TopLeft.Shape = tbCurve     : .TopLeft.Radius = 16     ' rounded
    .TopRight.Shape = tbNotched  : .TopRight.Radius = 16    ' diagonal cut
    .BottomLeft.Shape = tbCutOut : .BottomLeft.Radius = 16  ' carved-out
    .BottomRight.Shape = tbCurve : .BottomRight.Radius = 0  ' sharp 90°
End With

A Radius of 0 produces a sharp 90° corner regardless of Shape; a radius greater than or equal to half the control's smaller dimension turns a tbCurve corner into a quarter-circle that touches the centreline, which is the technique the package's Circle sample button uses to render a full circle from a rectangular control.

twinBASIC and LOGO copyright of "WaynePhillipsEA" author