GrapeCity MultiRow Windows Forms Documentation
HeaderCell Class
Members  Example 


Represents a Cell that is used to select and resize cells.
Object Model
HeaderCell ClassMultiRowFlatButtonAppearance ClassGcMultiRow ClassCellStyle ClassCellNote ClassSection ClassCellStyle ClassMultiRowTouchToolBar ClassValidatorCollection ClassCellValidator Class
Syntax
<FeatureAttribute(Name="Cell", Version="v5.0")>
<DesignerAttribute(DesignerBaseTypeName="System.ComponentModel.Design.IDesigner", DesignerTypeName="GrapeCity.Win.MultiRow.Design.HeaderCellDesigner,GrapeCity.Win.MultiRow.Design, Version=7.20.20141.0, Culture=neutral, PublicKeyToken=0f7a722ee3c2bdd9")>
<ToolboxItemFilterAttribute(FilterString="GrapeCity.Win.MultiRow.Template7", FilterType=ToolboxItemFilterType.Custom Or  _
    ToolboxItemFilterType.Prevent Or  _
    ToolboxItemFilterType.Require)>
<ToolboxBitmapAttribute()>
<ValueTypeEditorAttribute(TypeName="GrapeCity.Win.MultiRow.Design.CellMultiTypeValueEditor, GrapeCity.Win.MultiRow, Version=7.20.20141.0, Culture=neutral, PublicKeyToken=0f7a722ee3c2bdd9", AavailableForNullValue=False)>
<SRDescriptionAttribute("Displays a header-like cell.")>
Public Class HeaderCell 
   Inherits Cell
Dim instance As HeaderCell
[Feature(Name="Cell", Version="v5.0")]
[Designer(DesignerBaseTypeName="System.ComponentModel.Design.IDesigner", DesignerTypeName="GrapeCity.Win.MultiRow.Design.HeaderCellDesigner,GrapeCity.Win.MultiRow.Design, Version=7.20.20141.0, Culture=neutral, PublicKeyToken=0f7a722ee3c2bdd9")]
[ToolboxItemFilter(FilterString="GrapeCity.Win.MultiRow.Template7", FilterType=ToolboxItemFilterType.Custom | 
    ToolboxItemFilterType.Prevent | 
    ToolboxItemFilterType.Require)]
[ToolboxBitmap()]
[ValueTypeEditor(TypeName="GrapeCity.Win.MultiRow.Design.CellMultiTypeValueEditor, GrapeCity.Win.MultiRow, Version=7.20.20141.0, Culture=neutral, PublicKeyToken=0f7a722ee3c2bdd9", AavailableForNullValue=false)]
[SRDescription("Displays a header-like cell.")]
public class HeaderCell : Cell 
Remarks

This class is a base class for other header cell classes, such as ColumnHeaderCell, CornerHeaderCell, and RowHeaderCell. To create custom row header icons or column header glyphs, inherit from the HeaderCell class and add functionality to paint your own icon or glyph.

Note to Inheritors:

When you derive from HeaderCell and add new properties to the derived class, be sure to override the Clone method to copy the new properties during cloning operations. You should also call the base class's Clone method so that the properties of the base class are copied to the new cell.

Example
The following code example shows the HeaderCell's important properties. The GutterStyles draw gutters around the HeaderCell and they represent the cell's orientation. The hover effect is drawn by the HoverDirection property. By default, the HeaderCell uses the VistualStyle backcolor to draw the background. You can set the FlatStyle and UseVisualStyleBackColor and then change the HeaderCell's Cell.Style. The SelectionMode property indicates which cell or rows are selected when you click the HeaderCell.
using System;
using System.Windows.Forms;
using System.Drawing;

namespace GrapeCity.Win.MultiRow.SampleCode
{
    public class HeaderCellDemo : Form
    {
        private GcMultiRow gcMultiRow1 = new GcMultiRow();

        [STAThreadAttribute()]
        public static void Main()
        {
            Application.EnableVisualStyles();
            Application.Run(new HeaderCellDemo());
        }

        public HeaderCellDemo()
        {
            this.gcMultiRow1.Dock = DockStyle.Fill;
            this.Controls.Add(this.gcMultiRow1);
            this.Load += new EventHandler(Form1_Load);
            this.Size = new Size(400, 350);
            this.Text = "HeaderCell Demo";
        }
Imports System
Imports System.Windows.Forms
Imports System.Drawing
Imports GrapeCity.Win.MultiRow

Public Class HeaderCellDemo
    Inherits Form
    Private gcMultiRow1 As New GcMultiRow()

    <STAThreadAttribute()> _
    Public Shared Sub Main()
        Application.EnableVisualStyles()
        Application.Run(New HeaderCellDemo())
    End Sub

    Public Sub New()
        Me.gcMultiRow1.Dock = DockStyle.Fill
        Me.Controls.Add(Me.gcMultiRow1)
        Me.Size = New Size(400, 350)
        Me.Text = "HeaderCell Demo"
    End Sub
Inheritance Hierarchy

System.Object
   System.MarshalByRefObject
      System.ComponentModel.Component
         GrapeCity.Win.MultiRow.Cell
            GrapeCity.Win.MultiRow.HeaderCell
               GrapeCity.Win.MultiRow.ColumnHeaderCell
               GrapeCity.Win.MultiRow.CornerHeaderCell
               GrapeCity.Win.MultiRow.RowHeaderCell

Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

HeaderCell Members
GrapeCity.Win.MultiRow Namespace
RowHeaderCell Class
ColumnHeaderCell Class
CornerHeaderCell Class

 

 


Copyright © GrapeCity, inc. All rights reserved.