Type | Description | |||
Type as ScrollEnum | A ScrollEnum expression that indicates type of scrolling being performed. | |||
ScrollTo as Variant | A long expression that indicates the position where the control is scrolled when Type is exScrollVTo or exScrollHTo. If the ScrollTo parameter is missing, 0 value is used. |
If the Scroll(exScrollVTo) does not work please check if the ScrollBars property includes the exVScrollOnThumbRelease, and use a code like follows:
With Grid1 .ScrollBars = .ScrollBars And Not exVScrollOnThumbRelease .Scroll exScrollVTo, 10000 .ScrollBars = .ScrollBars Or exVScrollOnThumbRelease End With
The code removes temporary the exVScrollOnThumbRelease flag from the ScrollBars property, performs the scrolling ( jump to row 10000 ) , and restore back the exVScrollOnThumbRelease flag.
The following VB sample scrolls vertically the control line by line:
Private Sub Command1_Click() Grid1.Scroll exScrollDown End Sub
The following VB sample scrolls the control's content to the top:
Private Sub Command1_Click() Grid1.Scroll exScrollVTo, 0 End Sub
The following VB sample scrolls the control's content to the first item ( scrolls to the top ):
Grid1.Scroll exScrollVTo, 0
The following C++ sample scrolls the control's content to the top:
m_grid.Scroll( 2 /*exScrollVTo*/, COleVariant( (long)0 ) );
The following C# sample scrolls the control's content to the top:
axGrid1.Scroll(EXGRIDLib.ScrollEnum.exScrollVTo, 0);
The following VB.NET sample scrolls the control's content to the top:
AxGrid1.Scroll(EXGRIDLib.ScrollEnum.exScrollVTo, 0)
The following VFP sample scrolls the control's content to the top:
with thisform.Grid1 .Scroll( 2, 0 ) && exScrollVTo endwith