- 示例代码:
- <Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
- Partial Class Form1
- Inherits System.Windows.Forms.Form
- 'フォームがコンポーネントの一覧をクリーンアップするために dispose をオーバーライドします。
- <System.Diagnostics.DebuggerNonUserCode()> _
- Protected Overrides Sub Dispose(ByVal disposing As Boolean)
- Try
- If disposing AndAlso components IsNot Nothing Then
- components.Dispose()
- End If
- Finally
- MyBase.Dispose(disposing)
- End Try
- End Sub
- 'Windows フォーム デザイナーで必要です。
- Private components As System.ComponentModel.IContainer
- 'メモ: 以下のプロシージャは Windows フォーム デザイナーで必要です。
- 'Windows フォーム デザイナーを使用して変更できます。
- 'コード エディターを使って変更しないでください。
- <System.Diagnostics.DebuggerStepThrough()> _
- Private Sub InitializeComponent()
- Me.FpSpread1 = New FarPoint.Win.Spread.FpSpread()
- Me.FpSpread1_Sheet1 = New FarPoint.Win.Spread.SheetView()
- CType(Me.FpSpread1, System.ComponentModel.ISupportInitialize).BeginInit()
- CType(Me.FpSpread1_Sheet1, System.ComponentModel.ISupportInitialize).BeginInit()
- Me.SuspendLayout()
- '
- 'FpSpread1
- '
- Me.FpSpread1.AccessibleDescription = ""
- Me.FpSpread1.Location = New System.Drawing.Point(33, 31)
- Me.FpSpread1.Name = "FpSpread1"
- Me.FpSpread1.Sheets.AddRange(New FarPoint.Win.Spread.SheetView() {Me.FpSpread1_Sheet1})
- Me.FpSpread1.Size = New System.Drawing.Size(330, 141)
- Me.FpSpread1.TabIndex = 0
- '
- 'FpSpread1_Sheet1
- '
- Me.FpSpread1_Sheet1.Reset()
- Me.FpSpread1_Sheet1.SheetName = "Sheet1"
- '
- 'Form1
- '
- Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 12.0!)
- Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
- Me.ClientSize = New System.Drawing.Size(468, 303)
- Me.Controls.Add(Me.FpSpread1)
- Me.Name = "Form1"
- Me.Text = "Form1"
- CType(Me.FpSpread1, System.ComponentModel.ISupportInitialize).EndInit()
- CType(Me.FpSpread1_Sheet1, System.ComponentModel.ISupportInitialize).EndInit()
- Me.ResumeLayout(False)
- End Sub
- Friend WithEvents FpSpread1 As FarPoint.Win.Spread.FpSpread
- Friend WithEvents FpSpread1_Sheet1 As FarPoint.Win.Spread.SheetView
- End Class
- Public Class Form1
- Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
- Me.FpSpread1.Reset()
- Me.FpSpread1.ActiveSheet.OperationMode = FarPoint.Win.Spread.OperationMode.Normal
- Me.FpSpread1.EditModePermanent = True
- Me.FpSpread1.EditModeReplace = True
- Me.FpSpread1.Size = New Size(379, 141)
- Me.FpSpread1.ActiveSheet.Cells(0, 0, 4, Me.FpSpread1.ActiveSheet.ColumnCount - 1).Locked = True
- Me.FpSpread1.ActiveSheet.SetActiveCell(5, 0)
- End Sub
- End Class
复制代码
再现步骤:
1.通过滚动滚动条,是第一行能够表示
2.单击第一行的任意一个单元格
|