Rectangles are quite ubiquitous in modern user interfaces (UIs). Most buttons are rectangles (with some variations), and controls and containers are often rectangular in shape. The TRectangle shape can come in handy in a number of situations. In the Understanding shapes section, we covered how to use the Stroke and Fill properties to deeply customize the visuals of TRectangle with ease.
As a descendant class of TShape, TRectangle introduces some properties we will now focus on:
- Sides: This property's value represents a set of TSide (Top, Left, Bottom, and Right) that can be used to determine which sides are actually to be drawn for the rectangle.
- Corners: This value is a set of TCorner (TopLeft, TopRight, BottomLeft, and BottomRight) that can be used to determine which corners will actually be drawn for the rectangle.
- CornerType: The value for this property can be one entry of the TCornerType type (Round...