GrapeCity MultiRow Windows Forms Documentation
Direction Property (ScrollTipTextNeededEventArgs)
Example 


Gets a value that indicates the scroll direction.
Syntax
Public ReadOnly Property Direction As Orientation
Dim instance As ScrollTipTextNeededEventArgs
Dim value As Orientation
 
value = instance.Direction
public Orientation Direction {get;}

Property Value

An System.Windows.Forms.Orientation value that indicates the scroll direction. If scrolling in the vertical direction, the direction is vertical; otherwise, the direction is horizontal.
Example
The following code example shows how to customize a scroll tooltip when dragging a scroll bar to scroll. 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

ScrollTipTextNeededEventArgs Class
ScrollTipTextNeededEventArgs Members

 

 


Copyright © GrapeCity, inc. All rights reserved.