GrapeCity MultiRow Windows Forms Documentation
Changing the Header Appearance

The visual style is enabled in the GcMultiRow control headers by default. The effect of the visual style depends on the OS where the application is running. The following information is common for HeaderCell, ColumnHeaderCell, RowHeaderCell, and CornerHeaderCell sections.

Flat Style

You can use the flat style by setting the HeaderCell.FlatStyle property. The appearance when hovering with the mouse is set using the HeaderCell.FlatAppearance property.

Office 2007 Style

You can use the Office 2007-like style by setting the HeaderCell.Office2007Style property.

Office2007Style Appearance Line Color
Normal Mouse Over
Silver SilverANormal Silver, Mouse Hover Color.FromArgb(144, 145, 146)
Blue BlueANormal Blue, Mouse Hover Color.FromArgb(158, 182, 206)
Black BlackANormal Black, Mouse Hover Color.FromArgb(182, 182, 182)

Using Code

This example sets a style and border.

[VB]

Imports GrapeCity.Win.MultiRow

GcMultiRow1.Template = Template.Default
Dim template1 As Template = GcMultiRow1.Template
For Each cell As Cell In template1.ColumnHeaders(0).Cells
    If TypeOf cell Is HeaderCell Then
        Dim headerCell As HeaderCell = TryCast(cell, HeaderCell)
        headerCell.Office2007Style = Office2007Style.Blue
        headerCell.Style.Border = New Border(LineStyle.Thin, Color.FromArgb(158, 182, 206))
    End If
Next
GcMultiRow1.Template = template1

[CS]

using GrapeCity.Win.MultiRow;

gcMultiRow1.Template = Template.Default;
Template template1 = gcMultiRow1.Template;
foreach (Cell cell in template1.ColumnHeaders[0].Cells)
{
    if (cell is HeaderCell)
    {
        HeaderCell headerCell = cell as HeaderCell;
        headerCell.Office2007Style = Office2007Style.Blue;
        headerCell.Style.Border = new Border(LineStyle.Thin, Color.FromArgb(158, 182, 206));
    }
}
gcMultiRow1.Template = template1;

Header Borders

You can display the gutter specifying the boundaries in the header cell by using the HeaderCell.GutterStyles property. The gutter indicating the boundaries can be displayed on either or all of the top, bottom, left, or right sides. The header boundaries are displayed only when the visual style is enabled. In other cases, the boundaries are displayed using the cell Borders.

Effect Direction

You can specify the position of the highlight effect when the mouse pointer is on the header cell, using the HeaderCell.HoverDirection property. The highlight effect can be applied to either the top or bottom or right or left. You may also choose not to display it.

See Also

 

 


Copyright © GrapeCity, inc. All rights reserved.

Support Options