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

TdxNavBarCustomImagePainter.DrawImage(TCanvas,TCustomImageList,Integer,TRect,Boolean,IdxColorPalette) Method

Draws a specific image from an image list.

#Declaration

Delphi
class function DrawImage(ACanvas: TCanvas; AImageList: TCustomImageList; AImageIndex: Integer; const ARect: TRect; AEnabled: Boolean = True; AColorPalette: IdxColorPalette = nil): Boolean;

#Parameters

Name Type
ACanvas TCanvas
AImageList TCustomImageList
AImageIndex Integer
ARect TRect
AEnabled Boolean
AColorPalette IdxColorPalette

#Returns

Type
Boolean

#Remarks

You can use this method when implementing custom draw of NavBar elements. Commonly it is called for drawing:

The image to draw is obtained from the image list (AImageList) by its zero-based index (AImageIndex).

The ACanvas parameter specifies the graphic surface on which it is drawn.

Set the AEnabled parameter to False to paint the image grayed out.

The DrawImage method draws the entire image starting at the top-left point of the rectangle R.

For a vector image, you can use the optional AColorPalette parameter to specify a palette that provides named colors to paint outlines and fill enclosed polygons of the image. The DrawImage method ignores the specified palette if the image is a bitmap.

Note

For 32-bit images, use the TcxImageList component shipped with the Express Cross Platform Library.

See Also