Another important and commonly used type of control is panel. Panel constructor:
NewPanel(Parent, edge) - creates a panel of TControl type (by returning a pointer of PControl type to it - I will not dwell on this point anymore). The difference in the parameters is that the caption text string is not passed to this constructor. It's not that the panel can't have text. Maybe the same as the label. But here's the question: how often do you leave the default title (Panel1, Panel2, ...) for the panel in your Delphi project? Personally, in almost all cases, I immediately go to the Caption property in the Object Inspector and press the <Delete> button.
Thus, although the panel can have text, when designing the designer for it, I decided that usually this is, after all, an unnecessary parameter, and it is much more important when creating the panel to set the type of border for it (which is what is done). The panel can be flat, convex or depressed - which is specified by the second parameter of the constructor.
The panel has no other features. Unlike a label, it can (and this is what it is designed to do) parent other visual elements on a form. Including, when designing a form in MCK, the panel "accepts" the controls thrown onto it from the KOL toolbar as child controls.
Additionally, KOL has a special panel with a gradient fill effect for its content.
NewGradientPanel(Parent, Color1, Color2) - creates such a panel with the default style gsVertical. This fill style can be further modified by modifying the GradientStyle property, or by using an alternative constructor:
NewGradientPanelEx(Parent, Color1, Color2, style, layout)
There are styles of vertical, horizontal, diagonal - left to right top to bottom, and left to right bottom to top, as well as rhombic, elliptical and rectangular fill. It is also possible to control the placement of the conditional center of the fill (the last parameter of the second constructor is layout).
The gradient panel is a full-fledged panel, it can contain arbitrary child visual objects. If you use transparency (but not for all controls this is possible), you can get amazing effects. Of course, using a gradient bar adds a few kilobytes to the size of the application, so the choice between beauty and size is yours.