A highly customizable panel. TCustomPanel
descendant.
It was written on the basis of one of the panels included in the Cindy Components package (but I do not remember exactly which one).
The panel is divided into two parts - upper and lower. For each of them you can define colors separately. The size of the upper part (relative to the lower) can also be modified (property Appearance.UpperGradientPercent
). For example, you can set the upper gradient size to 30%, then the bottom will automatically take up the rest of the panel surface (70%). You can also completely eliminate the bottom gradient by setting the UpperGradientPercent
property to 100
.
If you need to fill the upper part with a gradient and the bottom one with a solid color, set the desired gradient colors of the upper part, then set the same starting and ending color of the gradient in the lower part.
If you do not want to use a gradient at all, you can easily turn it off by setting the Appearance.DrawGradient
property to False
, then the Appearance.BackgroundColor
color will be used to fill the panel background with a solid color.
You can set the thickness, color, style and visibility of the panel borders. Each border is configured separately. For example, you can set the upper border with a pen width = 10 in red, the lower border in green and a pen width = 2, and hide the left and right borders completely. If you do not want to display borders at all, set Appearance.DrawBorder
to False
and make sure that BevelOuter
property is set to bvNone
. You have a full control.
Unlimited collections of horizontal lines, vertical lines, captions and horizontal bars.
Properties: HorizontalLines
, VerticalLines
, Captions
, HorizontalBars
.
Each line (vertical and horizontal) is configured separately and can be set here all standard parameters for the lines - the color, weight, style. The lines can be positioned relative to the edges of the panel or centered.
The standard panel has only one caption, which is always centered and can not be changed. TJppPanel
can contain any number of captions. They can be centered or positioned relative to the corners of the panel. Moreover, each caption has its own font (TFont
) and you can freely set font styles, size and color for each caption separately.
The horizontal bars are simply rectangles, the size and position of which you can freely set. In addition, you can set the color, thickness and style of the rectangle's borders. Finally, each rectangle can be filled with a solid color or gradient.