GrapeCity.Win.MultiRow Namespace > GcMultiRow Class : ResizeTipTextNeeded Event |
<SRDescriptionAttribute("Occurs when the ShowResizeTip property of the GcMultiRow control is true and the user performs the resize operation. ")> <SRCategoryAttribute("Behavior")> Public Event ResizeTipTextNeeded As EventHandler(Of ResizeTipTextNeededEventArgs)
Dim instance As GcMultiRow Dim handler As EventHandler(Of ResizeTipTextNeededEventArgs) AddHandler instance.ResizeTipTextNeeded, handler
[SRDescription("Occurs when the ShowResizeTip property of the GcMultiRow control is true and the user performs the resize operation. ")] [SRCategory("Behavior")] public event EventHandler<ResizeTipTextNeededEventArgs> ResizeTipTextNeeded
The event handler receives an argument of type ResizeTipTextNeededEventArgs containing data related to this event. The following ResizeTipTextNeededEventArgs properties provide information specific to this event.
Property | Description |
---|---|
CellIndex | Gets the cell index in its parent Section. (Inherited from GrapeCity.Win.MultiRow.CellEventArgs) |
CellName | Gets the cell name. (Inherited from GrapeCity.Win.MultiRow.CellEventArgs) |
Direction | Gets a value that indicates the resize direction. |
NewValue | Gets the width or height value of the header cell in the current resize state. The unit is in pixels. |
OldValue | Gets the width or height of the cell before resizing. The unit is in pixels. |
ResizeTipText | Gets or sets the displayed text in the resize tip. |
RowIndex | Gets the index of the owner Row that the event occurs for. (Inherited from GrapeCity.Win.MultiRow.CellEventArgs) |
Scope | Gets the area of the cell that the event occurs for. (Inherited from GrapeCity.Win.MultiRow.CellEventArgs) |
SectionIndex | Gets the index of the owner Section that the event occurs for. (Inherited from GrapeCity.Win.MultiRow.CellEventArgs) |
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