Spread Windows Forms 9.0 Product Documentation
HitTestType Enumeration
Example Example 


Specifies the locations in the component for the HitTest method.
Syntax
'Declaration
 
Public Enum HitTestType 
   Inherits System.Enum
'Usage
 
Dim instance As HitTestType
public enum HitTestType : System.Enum 
Members
MemberDescription
ColumnFooterSpecifies that the location is in the column footer area of the component
ColumnHeaderSpecifies that the location is in the column header area of the component
ColumnSplitBarSpecifies that the location is in the column splitter bar area of the component
ColumnSplitBoxSpecifies that the location is in the column split box of the component
CornerSpecifies that the location is in the upper left sheet corner of a workbook
EmptySpecifies an empty location
FilterCellBarSpecifies that the location is in the filter bar
FilterHeaderBarSpecifies that the location is in the header of the filter bar
HorizontalScrollBarSpecifies that the location is in the horizontal scroll bar of the component
RangeGroupSpecifies that the location is in the outline (range group) area of the component
RowHeaderSpecifies that the location is in the row header area of the component
RowSplitBarSpecifies that the location is in the row splitter bar area of the component
RowSplitBoxSpecifies that the location is in the row split box of the component
TabSplitBoxSpecifies that the location is in the tab split box of the component
TabStripSpecifies that the location is in the sheet name tab area of the component
TitleBarSpecifies that the location is in the titles bar
VerticalScrollBarSpecifies that the location is in the vertical scroll bar of the component
ViewportSpecifies that the location is in a viewport of the data area of the component
Example
This example uses the HitTestType enumeration.
private void fpSpread1CellClick(object sender, FarPoint.Win.Spread.CellClickEventArgs e) 
{ 
      FarPoint.Win.Spread.HitTestInformation hti;
      hti = fpSpread1.HitTest(e.X, e.Y); 
      if (hti.Type == HitTestType.ColumnHeader) { 
            MessageBox.Show(hti.HeaderInfo.Column.ToString()); 
      } 
}
Private Sub FpSpread1CellClick(ByVal sender As Object, ByVal e As FarPoint.Win.Spread.CellClickEventArgs)
Dim hti As FarPoint.Win.Spread.HitTestInformation
hti = FpSpread1.HitTest(e.X, e.Y)
      If hti.Type = HitTestType.ColumnHeader Then
            MsgBox(hti.HeaderInfo.Column)
      End If
End Sub
Inheritance Hierarchy

System.Object
   System.ValueType
      System.Enum
         FarPoint.Win.Spread.HitTestType

Requirements

Target Platforms: Windows 2000 Professional (SP4), Windows 2000 Server, Windows 2003 Server (SP1), Windows Server 2012 R2, Windows 2008, Windows XP (SP2), Windows Vista, Windows 7, Windows 8, Windows 8.1, Windows 10

See Also

Reference

FarPoint.Win.Spread Namespace

User-Task Documentation

Locating the Cursor Using HitTest
Customizing the Default Header Labels

 

 


Copyright © GrapeCity, inc. All rights reserved.