Skip to main content

TdxNavBarGroupViewInfo.CaptionStyleItem Method

Provides access to the custom style assigned to the group header.

Declaration

function CaptionStyleItem: TdxNavBarStyleItem; virtual;

Returns

Type
TdxNavBarStyleItem

Remarks

The CaptionStyleItem property returns the custom style assigned to the group header with respect to its current state. Thus it can return either the CustomStyles.Header, CustomStyles.HeaderActive, CustomStyles.HeaderHotTracked or CustomStyles.HeaderPressed property value of the group. If the desired custom style is not set, this function returns nil.

Use this property when handling the OnCustomDraw.GroupCaption event. You can change property values of the object returned via this property to change the look & feel of group headers. Using this technique is an alternative to specifying custom styles for each group of the NavBar control. Moreover, this enables you to apply various styles to group headers dynamically.

Note that if you want a group header to be painted in default manner but with modified styles, you should leave the AHandled parameter of the OnCustomDraw.GroupCaption event unchanged (set to False).

Note

this property returns the custom style applied to the group. Use the CaptionStyle property to access the default style applied to all groups.

See Also