[]
Gets or sets a value indicating which mode to indicate current scroll location.
public ScrollIndicatorMode ScrollIndicatorMode { get; set; }
Type | Description |
---|---|
ScrollIndicatorMode | One of ScrollIndicatorMode values. The default is ScrollIndicator. |
The following code example shows how to use this property.
This code example is part of a larger example provided for the ScrollIndicatorMode property.
public class GcZoomScrollDemo : Form
{
private ComboBox _scrollIndicatorModeComboBox;
private GcZoom _gcZoom1 = new GcZoom();
public GcZoomScrollDemo()
{
InitializeComponent();
_gcZoom1.Target = this;
_scrollIndicatorModeComboBox.TextChanged += _scrollIndicatorModeComboBox_TextChanged;
}
void _scrollIndicatorModeComboBox_TextChanged(object sender, EventArgs e)
{
switch (_scrollIndicatorModeComboBox.Text)
{
case "None":
this._gcZoom1.ScrollIndicatorMode = ScrollIndicatorMode.None;
break;
case "ScrollBar":
this._gcZoom1.ScrollIndicatorMode = ScrollIndicatorMode.ScrollBar;
break;
case "ScrollIndicator":
this._gcZoom1.ScrollIndicatorMode = ScrollIndicatorMode.ScrollIndicator;
break;
default:
break;
}
}
private void InitializeComponent()
{
_scrollIndicatorModeComboBox = new System.Windows.Forms.ComboBox();
_scrollIndicatorModeComboBox.Items.AddRange(new object[] { "None", "ScrollBar", "ScrollIndicator" });
_scrollIndicatorModeComboBox.Location = new Point(120, 20);
this.Controls.Add(_scrollIndicatorModeComboBox);
}
}
Public Class GcZoomScrollDemo
Inherits Form
Private _scrollIndicatorModeComboBox As ComboBox
Private _gcZoom1 As New GcZoom()
Public Sub New()
InitializeComponent()
_gcZoom1.Target = Me
AddHandler _scrollIndicatorModeComboBox.TextChanged, AddressOf _scrollIndicatorModeComboBox_TextChanged
End Sub
Private Sub _scrollIndicatorModeComboBox_TextChanged(sender As Object, e As EventArgs)
Select Case _scrollIndicatorModeComboBox.Text
Case "None"
Me._gcZoom1.ScrollIndicatorMode = ScrollIndicatorMode.None
Exit Select
Case "ScrollBar"
Me._gcZoom1.ScrollIndicatorMode = ScrollIndicatorMode.ScrollBar
Exit Select
Case "ScrollIndicator"
Me._gcZoom1.ScrollIndicatorMode = ScrollIndicatorMode.ScrollIndicator
Exit Select
Case Else
Exit Select
End Select
End Sub
Private Sub InitializeComponent()
_scrollIndicatorModeComboBox = New System.Windows.Forms.ComboBox()
_scrollIndicatorModeComboBox.Items.AddRange(New Object() {"None", "ScrollBar", "ScrollIndicator"})
_scrollIndicatorModeComboBox.Location = New Point(120, 20)
Me.Controls.Add(_scrollIndicatorModeComboBox)
End Sub
End Class