ComponentOne True DBGrid Pro 8
OwnerDrawPageHeader Event

 

Object Reference> True DBGrid Events> OwnerDrawPageHeader Event

OwnerDrawPageHeader Event

The OwnerDrawPageHeader event occurs just before the header is to be printed.

Syntax

TDBGrid_OwnerDrawPageHeader (ByVal hDC As Long, ByVal Page As Long, ByVal Pages As Long, ByVal Group As Long, ByVal Groups As Long, ByVal Subpage As Long, ByVal Subpages As Long, ByVal Left As Integer, ByVal Top As Integer, ByVal Right As Integer, ByVal Bottom As Integer)

Arguments

hDC is a handle to the printer device context, which is required by all Windows GDI calls.

Page is the current page number.

Pages is the total number of pages.

Group is the current group number.

Groups is the total number of groups.

Subpage is the current subpage.

Subpages is the total number of subpages.

Left is an integer that indicates the left coordinate of the cell to be painted.

Top is an integer that indicates the top coordinate of the cell to be painted.

Right is an integer that indicates the right coordinate of the cell to be painted.

Bottom is an integer that indicates the bottom coordinate of the cell to be painted.

Remarks

This event is only fired for PrintInfo objects in which the PageHeaderOwnerDraw property is set to True.

You can use this event to customize the appearance of the header by drawing directly to the printer device context using standard Windows GDI calls. Note that this is an enhanced metafile device context, so some operations (such as BitBlt) are not available.

Note

Since the mapping mode of the printer device context is MM_ISOTROPIC, not MM_TEXT, the Left, Top, Right, and Bottom arguments are in logical units, not Pixels. Use the UnitsPerInch property to determine the resolution of the printer device context.

See Also

TDBGrid Control

 

 


Copyright (c) GrapeCity, inc. All rights reserved.

Product Support Forum  |  Documentation Feedback