BCGControlBar Pro for MFC
CBCGPGridColumnsInfoEx

Detailed Description

The CBCGPGridColumnsInfoEx class extends the functionality of the CBCGPGridColumnsInfo class to allow creation of custom header layout.

To create a custom layout you have to perform the following steps:

Example 1:

Copy
// The sample adds the additional header line above all columns
m_ColumnsEx.SetHeaderLineCount(2);
CArray<int, int> arrLines;
arrLines.Add(0);
m_ColumnsEx.AddHeaderItem(NULL, &arrLines, -1, _T("Span to all columns"), HDR_CENTER);

Example 2:

Copy
// The sample merges header for columns #2 and #3
CArray<int, int> arrMergeColumns;
arrMergeColumns.Add(2);
arrMergeColumns.Add(3);
m_ColumnsEx.AddHeaderItem (&arrMergeColumns, NULL, -1, _T("Span columns #2 and #3"), HDR_CENTER, 4);
+ Inheritance diagram for CBCGPGridColumnsInfoEx:

Public Member Functions

 AddHeaderItemAdds a new header item for the layout.
 
 GetHeaderLineCountReturns the number of header lines.
 
 GetHeaderTooltipReturns header tooltip.
 
 RemoveAllHeaderItemsRemoves all header items and restores the default header layout.
 
 SetHeaderLineCountSets header line count.
 
- Public Member Functions inherited from CBCGPGridColumnsInfo
 EnableCheckBoxEnables or disables the grid column check box.
 
 EnableScaledInZoomedGridSpecifies whether grid columns should be automatically resized when the grid is zoomed in/zoomed out.
 
 GetCheckBoxStateRetrieves the column check state.
 
 GetColumnImageReturns the zero-based index of the image, associated with the specified column.
 
 GetColumnWidthAutoSizeTells whether a column has fixed, or automatic size.
 
 HitTestColumnCall this method to obtain information about a column from the given point.
 
 InsertColumnsInserts several columns into the grid control.
 
 IsCheckBoxEnabledTells whether a grid column check box is enabled or not.
 
 IsScaledInZoomedGridTells whether grid columns should be automatically resized when the grid is zoomed in/zoomed out.
 
 ResizeRecalculates the width of columns to fit the working area of the grid control.
 
 SetCheckBoxStateSets a column check state.
 
 SetColumnImageAssociates the column with image from the header's image list.
 
 SetColumnWidthAutoSizeEnables or disables automatic size for a column.
 
 SetHeaderMultiLineSets a column header to multiline mode.