Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

TcxHotZoneStyle.DrawHotZone(TcxCanvas,TRect,Boolean,Boolean) Method

Paints the hot zone.

#Declaration

Delphi
function DrawHotZone(ACanvas: TcxCanvas; const ARect: TRect; const AHighlighted: Boolean; const AClicked: Boolean): TRect; virtual;

#Parameters

Name Type
ACanvas TcxCanvas
ARect TRect
AHighlighted Boolean
AClicked Boolean

#Returns

Type
TRect

#Remarks

The hot zone’s DrawHotZone method is called by its owner control when the hot zone needs to be repainted. As implemented in the TcxHotZoneStyle class, this method does nothing. TcxHotZoneStyle descendants override it to implement painting of hot zones. Thus, if you are designing a custom hot zone, you must to override this method to paint the hot zone.

The ACanvas parameter specifies the TcxCanvas object which provides the painting surface. Use the methods and properties of this object to implement painting of primitives. The ARect parameter specifies the bounding rectangle of the owner control (for instance, a splitter). The hot zone must be painted within these boundaries. The AHighlighted and AClicked parameters specify whether the hot zone is hot-tracked or pressed. You may provide a painting routine which allows for these parameter values so that the hot zone has various appearances in different states.

Most probably, you will need to know the orientation of the hot zone when painting. Use the SplitterDirection property to determine it.

Note

The ARect parameter value is used to calculate the bounding rectangle of the hot zone. The calculated value is returned by the CalculateHotZoneRect function.

Refer to the Creating a Custom Hot Zone Style topic for an example of overriding this method.

See Also