GrapeCity MultiRow Windows Forms Documentation
ScrollTipTextNeeded Event
Example 


Occurs when dragging the scroll bar and the scroll tip is displayed.
Syntax
<SRCategoryAttribute("Behavior")>
<SRDescriptionAttribute("Occurs when the ShowScrollTip property of the GcMultiRow control is not none and the scroll ToolTip is being shown.")>
Public Event ScrollTipTextNeeded As EventHandler(Of ScrollTipTextNeededEventArgs)
Dim instance As GcMultiRow
Dim handler As EventHandler(Of ScrollTipTextNeededEventArgs)
 
AddHandler instance.ScrollTipTextNeeded, handler
[SRCategory("Behavior")]
[SRDescription("Occurs when the ShowScrollTip property of the GcMultiRow control is not none and the scroll ToolTip is being shown.")]
public event EventHandler<ScrollTipTextNeededEventArgs> ScrollTipTextNeeded
Event Data

The event handler receives an argument of type ScrollTipTextNeededEventArgs containing data related to this event. The following ScrollTipTextNeededEventArgs properties provide information specific to this event.

PropertyDescription
DirectionGets a value that indicates the scroll direction.  
ScrollBarValueGets a value that indicates the scroll bars current value. Units are in pixels.  
ScrollRowIndexGets a value that indicates the index of the first visible row in the screen.  
ScrollTipTextGets or sets the text shown in the scroll tip.  
Remarks
The scroll tip is displayed when you drag the scroll bar. You can handle this event to customize the scroll tip text.
Example
The following code example shows how to customize the scroll tooltip when dragging the scroll bar. This code example is part of a larger example provided for the ShowScrollTip property.
void gcMultiRow_ScrollTipTextNeeded(object sender, ScrollTipTextNeededEventArgs e)
        {
            if (e.Direction == Orientation.Horizontal)
            {
                e.ScrollTipText = "Scroll to " + e.ScrollBarValue.ToString() + " pixel";
            }
            else
            {
                e.ScrollTipText = "Scroll to " + e.ScrollRowIndex.ToString() + " row";
            }
        }
Private Sub gcMultiRow_ScrollTipTextNeeded(ByVal sender As Object, ByVal e As ScrollTipTextNeededEventArgs) Handles gcMultiRow.ScrollTipTextNeeded
        If e.Direction = Orientation.Horizontal Then
            e.ScrollTipText = "Scroll to " + e.ScrollBarValue.ToString() + " pixel"
        Else
            e.ScrollTipText = "Scroll to " + e.ScrollRowIndex.ToString() + " row"
        End If
    End Sub
Requirements

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

See Also

Reference

GcMultiRow Class
GcMultiRow Members

 

 


Copyright © GrapeCity, inc. All rights reserved.