GrapeCity MultiRow Windows Forms Documentation
MouseWheelCount Property
Example 


Gets or sets the number of rows to scroll when the mouse wheel is rotated.
Syntax
<SRDescriptionAttribute("Indicates how much the GcMultiRow is scrolled when rolling the Mouse wheel one notch.")>
<FeatureAttribute(Name="Scroll", Version="v5.0")>
<SRCategoryAttribute("Behavior")>
Public Property MouseWheelCount As Integer
Dim instance As GcMultiRow
Dim value As Integer
 
instance.MouseWheelCount = value
 
value = instance.MouseWheelCount
[SRDescription("Indicates how much the GcMultiRow is scrolled when rolling the Mouse wheel one notch.")]
[Feature(Name="Scroll", Version="v5.0")]
[SRCategory("Behavior")]
public int MouseWheelCount {get; set;}

Property Value

A System.Int32 that indicates the number of rows to scroll in one rotation of the mouse wheel. If the value is -1, the mouse wheel scrolls one page.
Exceptions
ExceptionDescription
System.ArgumentExceptionThe specified value is less than 1 and not equal to -1.
Remarks
When the ScrollMode property value is ScrollMode.Row, the MouseWheelCount's value represents the scrolled rows' count. The ScrollMode value is ScrollMode.Pixel and the MouseWheelCount's value represents the scrolled pixel's value.
Example
This example sets the MouseWheelCount property.
GrapeCity.Win.MultiRow.TextBoxCell text1 = new GrapeCity.Win.MultiRow.TextBoxCell();
GrapeCity.Win.MultiRow.TextBoxCell text2 = new GrapeCity.Win.MultiRow.TextBoxCell();
text1.Name = "text1";
text2.Name = "text2";
GrapeCity.Win.MultiRow.Template template1 = GrapeCity.Win.MultiRow.Template.CreateGridTemplate(new GrapeCity.Win.MultiRow.Cell[] { text1, text2 }, 160, GrapeCity.Win.MultiRow.AutoGenerateGridTemplateStyles.ColumnHeader | GrapeCity.Win.MultiRow.AutoGenerateGridTemplateStyles.RowHeaderAutoNumber);
template1.ColumnHeaders[0].Cells[0].Value = "Column1";
template1.ColumnHeaders[0].Cells[1].Value = "Column2";
gcMultiRow1.Template = template1;
gcMultiRow1.RowCount = 10;
gcMultiRow1.MouseWheelCount = 2;
gcMultiRow1.MouseWheelDirection = Orientation.Vertical;
Dim text1 As New GrapeCity.Win.MultiRow.TextBoxCell()
Dim text2 As New GrapeCity.Win.MultiRow.TextBoxCell()
text1.Name = "text1"
text2.Name = "text2"
Dim template1 As GrapeCity.Win.MultiRow.Template = GrapeCity.Win.MultiRow.Template.CreateGridTemplate(New GrapeCity.Win.MultiRow.Cell() {text1, text2}, 160, GrapeCity.Win.MultiRow.AutoGenerateGridTemplateStyles.ColumnHeader Or GrapeCity.Win.MultiRow.AutoGenerateGridTemplateStyles.RowHeaderAutoNumber)
template1.ColumnHeaders(0).Cells(0).Value = "Column1"
template1.ColumnHeaders(0).Cells(1).Value = "Column2"
GcMultiRow1.Template = template1
GcMultiRow1.RowCount = 10
GcMultiRow1.MouseWheelCount = 2
GcMultiRow1.MouseWheelDirection = Orientation.Vertical
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.