Code:
/ FX-1434 / FX-1434 / 1.0 / untmp / whidbey / REDBITS / ndp / fx / src / WinForms / Managed / System / WinForms / DataGridViewHitTestInfo.cs / 1 / DataGridViewHitTestInfo.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- using System.Globalization; namespace System.Windows.Forms { public partial class DataGridView { ///public sealed class HitTestInfo { internal DataGridViewHitTestType type = DataGridViewHitTestType.None; //internal DataGridViewHitTestTypeCloseEdge edge = DataGridViewHitTestTypeCloseEdge.None; internal DataGridViewHitTestTypeInternal typeInternal = DataGridViewHitTestTypeInternal.None; internal int row; internal int col; internal int adjacentRow; internal int adjacentCol; internal int mouseBarOffset; internal int rowStart; internal int colStart; /// /// /// public static readonly HitTestInfo Nowhere = new HitTestInfo(); internal HitTestInfo() { this.type = DataGridViewHitTestType.None; this.typeInternal = DataGridViewHitTestTypeInternal.None; //this.edge = DataGridViewHitTestTypeCloseEdge.None; this.row = this.col = -1; this.rowStart = this.colStart = -1; this.adjacentRow = this.adjacentCol = -1; } ///Allows the ///object to inform you the /// extent of the grid. /// /// public int ColumnIndex { get { return this.col; } } ///Gets the number of the clicked column. ////// /// public int RowIndex { get { return this.row; } } ///Gets the /// number of the clicked row. ////// /// public int ColumnX { get { return this.colStart; } } ///Gets the left edge of the column. ////// /// public int RowY { get { return this.rowStart; } } ///Gets the top edge of the row. ////// /// public DataGridViewHitTestType Type { get { return this.type; } } ///Gets the part of the ///control, other than the row or column, that was /// clicked. /// /// public override bool Equals(object value) { HitTestInfo hti = value as HitTestInfo; if (hti != null) { return (this.type == hti.type && this.row == hti.row && this.col == hti.col); } return false; } ///Indicates whether two objects are identical. ////// /// public override int GetHashCode() { return WindowsFormsUtils.GetCombinedHashCodes((int) this.type, this.row, this.col); } ///Gets the hash code for the ///instance. /// /// public override string ToString() { return "{ Type:" + type.ToString() + ", Column:" + col.ToString(CultureInfo.CurrentCulture) + ", Row:" + row.ToString(CultureInfo.CurrentCulture) + " }"; } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved.Gets the type, column number and row number. ///
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- GetCardDetailsRequest.cs
- FlagsAttribute.cs
- Site.cs
- StylusDownEventArgs.cs
- ObjectSpanRewriter.cs
- PersonalizationProvider.cs
- TogglePatternIdentifiers.cs
- ParameterBuilder.cs
- Authorization.cs
- Int64.cs
- ControlIdConverter.cs
- basecomparevalidator.cs
- NullRuntimeConfig.cs
- SamlSecurityToken.cs
- SvcMapFile.cs
- Base64Encoding.cs
- Polyline.cs
- FileUtil.cs
- AdapterUtil.cs
- ObjectConverter.cs
- Compensate.cs
- ClientApiGenerator.cs
- XmlObjectSerializerReadContextComplexJson.cs
- BitmapEffectGroup.cs
- DefaultProxySection.cs
- DetailsView.cs
- EventItfInfo.cs
- CodeStatement.cs
- XmlAttributeAttribute.cs
- OleDbException.cs
- SignedXml.cs
- Bold.cs
- OdbcException.cs
- ToolStripSplitButton.cs
- ToolStripItemImageRenderEventArgs.cs
- SQLGuid.cs
- ImageButton.cs
- BindingExpressionUncommonField.cs
- SoapSchemaExporter.cs
- SelectionChangedEventArgs.cs
- HtmlInputRadioButton.cs
- SapiAttributeParser.cs
- HashCodeCombiner.cs
- NetworkAddressChange.cs
- AutoGeneratedField.cs
- AggregateNode.cs
- MeshGeometry3D.cs
- DataBindingHandlerAttribute.cs
- UnderstoodHeaders.cs
- DataGridViewRowCollection.cs
- SemaphoreFullException.cs
- TraceListeners.cs
- BitmapEffectRenderDataResource.cs
- GreenMethods.cs
- FileDialogCustomPlace.cs
- ColumnReorderedEventArgs.cs
- HttpException.cs
- AttachedPropertyInfo.cs
- Walker.cs
- DataGridViewColumnEventArgs.cs
- SecurityElement.cs
- SynchronizationValidator.cs
- ObjectAssociationEndMapping.cs
- AssemblySettingAttributes.cs
- OutputCacheProfileCollection.cs
- SQLUtility.cs
- xmlglyphRunInfo.cs
- _KerberosClient.cs
- WrappedKeySecurityTokenParameters.cs
- ControlBindingsCollection.cs
- embossbitmapeffect.cs
- ValidationResult.cs
- LineServices.cs
- CheckBoxPopupAdapter.cs
- OleDbSchemaGuid.cs
- PersonalizablePropertyEntry.cs
- TypeBuilder.cs
- MSAAEventDispatcher.cs
- AesCryptoServiceProvider.cs
- DeclarativeCatalogPart.cs
- _NestedMultipleAsyncResult.cs
- TextTreeInsertUndoUnit.cs
- WindowsListBox.cs
- SettingsPropertyWrongTypeException.cs
- InvalidProgramException.cs
- GridViewPageEventArgs.cs
- FormatSettings.cs
- ManagementPath.cs
- AsymmetricCryptoHandle.cs
- WaitHandleCannotBeOpenedException.cs
- CaseInsensitiveHashCodeProvider.cs
- Pair.cs
- XmlCharType.cs
- PresentationAppDomainManager.cs
- UpdateExpressionVisitor.cs
- DelegateBodyWriter.cs
- DBCSCodePageEncoding.cs
- SqlRewriteScalarSubqueries.cs
- TranslateTransform3D.cs
- TextEditorContextMenu.cs