The category panel group is primarily a container, like a panel, but it adds some valuable aesthetic and functional features. Still, because it is a Windows control (it descends from TWinControl), it has some normal characteristics such as a name, background color, and a size. After visually adding the control to a form, you can change these properties in the Object Inspector.
By default, after adding a category panel group to a form, it is glued to the left. Although this characteristics is inherited from the TWinControl class, it has a valuable importance from this control because you should make sure it is visible at all times. In fact, depending the requirements of your application, you can use as many category panel groups as you want. You can position one to the left, another to the right, etc. To visually specify the alignment of a category panel group, use the Align field in the Object Inspector.
Probably the most important characteristic of a category panel group is the section(s) it contains. Each section is referred to as a panel. To visually create a panel, right-click the panel and click New Panel:
In the same way, you can add as many panels as you want. Each panel is based on the TCategoryPanel class, which is derived from TCustomPanel. In other words, the TCategoryPanel and the TPanel classes have the same ancestor. After adding a panel, it gets equipped with a buttoned header that is made of three sections: a left, a middle, and a right sides.
By default, the left section shows a semi-button named a chevron. The chevron displays two Vs, one on top of the other, as its caption. By default, the chevron is positioned in the left section of the header. You can position it to the center or the right section. To support this, the TCustomCategoryPanelGroup class is equipped with the ChevronAligngnment property that is of type TAlignment: __property Classes::TAlignment ChevronAlignment = { read=FChevronAlignment, write=SetChevronAlignment }; To visually specify the alignment of a chevron, access the Object Inspector for the category panel group and accept or change the value of the ChevronAlignment field. By default, the chevron appears in a gray color. If you want to make it appear in a different color, access the ChevronColor field in the Object Inspector and select a color of your choice. The ChevronHotColor is the color by which the chevron would appear when the user positions the mouse on top of it.
|
|
|||||||||||||||
|