GrapeCity.Win.MultiRow Namespace > GcMultiRow Class : ShowResizeTip Property |
<SRDescriptionAttribute("Indicates whether the resize tip is shown when users resize the cells horizontally or vertically.")> <DefaultValueAttribute()> <SRCategoryAttribute("Appearance")> Public Property ShowResizeTip As ResizeMode
Dim instance As GcMultiRow Dim value As ResizeMode instance.ShowResizeTip = value value = instance.ShowResizeTip
[SRDescription("Indicates whether the resize tip is shown when users resize the cells horizontally or vertically.")] [DefaultValue()] [SRCategory("Appearance")] public ResizeMode ShowResizeTip {get; set;}
Exception | Description |
---|---|
System.ComponentModel.InvalidEnumArgumentException | The specified value is not one of the ResizeMode values. |
Typically, the text in the tip is the width or height of the cell in pixels. Handle the ResizeTipTextNeeded event and change the ResizeTipTextNeededEventArgs.ResizeTipText property in the ResizeTipTextNeededEventArgs to customize the text in the resize tip.
The resize tip is shown at the top of the mouse position when the resize starts. Once the resize operation begins, the position of the resize tip does not change.
private void Form1_Load(object sender, EventArgs e) { // Use AllowUserToResize property to disable/enable MultiRow control's UIResize. this.gcMultiRow1.AllowUserToResize = true; // Show resize tip when UI resize. this.gcMultiRow1.ShowResizeTip = ResizeMode.Both; // Customize resize tip. this.gcMultiRow1.ResizeTipTextNeeded += new EventHandler<ResizeTipTextNeededEventArgs>(gcMultiRow1_ResizeTipTextNeeded); } void gcMultiRow1_ResizeTipTextNeeded(object sender, ResizeTipTextNeededEventArgs e) { // Customize 1nd column's resize tip and 1nd rows resize tip. if (e.CellIndex == 0 || e.RowIndex == 0) { string direction = "height"; if (e.Direction == Orientation.Horizontal) { direction = "width"; } e.ResizeTipText = "Cell " + direction + " resize from " + e.OldValue + " to " + e.NewValue; } }
Private Sub Form1_Load(ByVal sender As Object, ByVal e As EventArgs) Handles Me.Load ' Use AllowUserToResize property to disable/enable MultiRow control's UIResize. Me.gcMultiRow1.AllowUserToResize = True ' Show resize tip when UI resize. Me.gcMultiRow1.ShowResizeTip = ResizeMode.Both End Sub Private Sub gcMultiRow1_ResizeTipTextNeeded(ByVal sender As Object, ByVal e As ResizeTipTextNeededEventArgs) Handles gcMultiRow1.ResizeTipTextNeeded ' Customize 1nd column's resize tip and 1nd rows resize tip. If e.CellIndex = 0 OrElse e.RowIndex = 0 Then Dim direction As String = "height" If e.Direction = Orientation.Horizontal Then direction = "width" End If e.ResizeTipText = "Cell " + direction + " resize from " + e.OldValue.ToString() + " to " + e.NewValue.ToString() End If End Sub
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