Code:
/ FX-1434 / FX-1434 / 1.0 / untmp / whidbey / REDBITS / ndp / fx / src / WinForms / Managed / System / WinForms / DataGridViewToolTip.cs / 2 / DataGridViewToolTip.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- using System.Security; using System.Diagnostics; using System.Drawing; using System.Runtime.InteropServices; namespace System.Windows.Forms { public partial class DataGridView { private class DataGridViewToolTip { DataGridView dataGridView = null; ToolTip toolTip = null; private bool toolTipActivated = false; public DataGridViewToolTip(DataGridView dataGridView) { this.dataGridView = dataGridView; } public bool Activated { get { return this.toolTipActivated; } } public ToolTip ToolTip { get { return this.toolTip; } } public void Activate(bool activate) { if (this.dataGridView.DesignMode) { return; } // Create the tool tip handle on demand. if (activate && this.toolTip == null) { this.toolTip = new ToolTip(); this.toolTip.ShowAlways = true; this.toolTip.InitialDelay = 0; this.toolTip.UseFading = false; this.toolTip.UseAnimation = false; this.toolTip.AutoPopDelay = 0; } if (this.dataGridView.IsRestricted) { IntSecurity.AllWindows.Assert(); } try { if (activate) { this.toolTip.Active = true; this.toolTip.Show(this.dataGridView.ToolTipPrivate, this.dataGridView); } else if (this.toolTip != null) { this.toolTip.Hide(this.dataGridView); this.toolTip.Active = false; } } finally { if (this.dataGridView.IsRestricted) { CodeAccessPermission.RevertAssert(); } } this.toolTipActivated = activate; } public void Dispose() { if (this.toolTip != null) { this.toolTip.Dispose(); this.toolTip = null; } } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- Exceptions.cs
- __TransparentProxy.cs
- Light.cs
- RoutedEventConverter.cs
- CommandEventArgs.cs
- DataControlLinkButton.cs
- SqlAggregateChecker.cs
- ipaddressinformationcollection.cs
- BridgeDataReader.cs
- RouteItem.cs
- ApplicationDirectory.cs
- GridItem.cs
- XmlLanguage.cs
- HtmlWindow.cs
- ColorIndependentAnimationStorage.cs
- ErrorTolerantObjectWriter.cs
- ProtocolViolationException.cs
- GregorianCalendarHelper.cs
- Vector3DCollectionConverter.cs
- InputGestureCollection.cs
- Matrix.cs
- DataTablePropertyDescriptor.cs
- UserPreferenceChangedEventArgs.cs
- EditorPartCollection.cs
- TransactionsSectionGroup.cs
- DesignerCategoryAttribute.cs
- DecoderBestFitFallback.cs
- StrokeDescriptor.cs
- ToolStripSystemRenderer.cs
- ProcessModelInfo.cs
- XPathBuilder.cs
- ListDictionary.cs
- SettingsBase.cs
- FixedFindEngine.cs
- SendingRequestEventArgs.cs
- DataReceivedEventArgs.cs
- MissingManifestResourceException.cs
- XmlEntity.cs
- UniformGrid.cs
- OleDbEnumerator.cs
- ISO2022Encoding.cs
- HttpCapabilitiesSectionHandler.cs
- HScrollProperties.cs
- BypassElement.cs
- HashRepartitionStream.cs
- MaskedTextBoxTextEditorDropDown.cs
- LineServicesRun.cs
- ZoneLinkButton.cs
- XmlSchemaElement.cs
- RadioButtonList.cs
- ObjectAnimationUsingKeyFrames.cs
- EnumBuilder.cs
- ResourceReferenceKeyNotFoundException.cs
- ObjectTokenCategory.cs
- GridViewUpdateEventArgs.cs
- BooleanSwitch.cs
- Matrix3DStack.cs
- UrlUtility.cs
- TextPatternIdentifiers.cs
- ICspAsymmetricAlgorithm.cs
- ParallelActivityDesigner.cs
- ConfigXmlAttribute.cs
- WebConfigurationHostFileChange.cs
- XPathNodeInfoAtom.cs
- TransformPattern.cs
- DataControlPagerLinkButton.cs
- TableItemProviderWrapper.cs
- PenContexts.cs
- OracleConnectionStringBuilder.cs
- BitmapFrameEncode.cs
- ChangesetResponse.cs
- PipelineModuleStepContainer.cs
- BasicHttpSecurityElement.cs
- RectConverter.cs
- TextFormatterImp.cs
- FontUnit.cs
- XPathNodePointer.cs
- DeviceSpecificChoice.cs
- ContentType.cs
- BoundPropertyEntry.cs
- SqlEnums.cs
- RuleSetDialog.Designer.cs
- CollectionViewGroup.cs
- ValidationRuleCollection.cs
- TextFormatter.cs
- Point.cs
- TextOptions.cs
- DiscoveryInnerClientAdhocCD1.cs
- Events.cs
- AstNode.cs
- SqlBinder.cs
- LineUtil.cs
- DataGridAutoFormatDialog.cs
- ToolStripArrowRenderEventArgs.cs
- LineGeometry.cs
- ControlValuePropertyAttribute.cs
- WebPartEditorCancelVerb.cs
- SrgsRulesCollection.cs
- Point3D.cs
- ReadOnlyDictionary.cs