wuxing@name
  • Archives
  • Baby
  • CODING
  • About
wuxing@name
  • Archives
  • Baby
  • CODING
  • About
Tag:

RadioButton

程序开发

[原创]PointFar Spread 使用 RadioButton MultiOption 单选

by Andy 4月 28, 2011

想用 PointFar Spread 的 RadioButton MultiOption 进行单选,但是自带的 Spread Designer选择 cell style 为 MultiOption 后没有任何效果,没有checkbox 好用。只好采用代码的方式解决了。

       '1.将以下代码 放入 Form Load 或其他事件中
        With Me.spList4.ActiveSheet
            Dim multiType As New FarPoint.Win.Spread.CellType.MultiOptionCellType
            multiType.Items = New String() {" "}
            For i As Integer = 0 To .RowCount - 1
                    .Cells(i, 0).CellType = multiType
                If i = 0 Then
		'选中第一行,第一列的 0为选中 1为非选
                    .Cells(0, 0).Value = 0
                End If
            Next
        End With
     
   '2.然后加入 以下事件代码 实现单选
    Private Sub spList4_LeaveCell(ByVal sender As System.Object, ByVal e As FarPoint.Win.Spread.LeaveCellEventArgs) Handles spList4.LeaveCell
        Me.spList4.ActiveSheet.Cells(e.Row, 0).Value = 1
        Me.spList4.ActiveSheet.Cells(e.NewRow, 0).Value = 0
    End Sub
4月 28, 2011 0 comment
0 FacebookTwitterPinterestEmail

About Me

About Me

Writer & Reader

Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit, sed.

Recent Posts

  • Gunicorn FastAPI 宝塔Linux 部署

    8月 26, 2021
  • DeepL机器翻译的力量

    7月 7, 2020
  • net Core Rest Api 调用

    7月 7, 2020
  • Oracle EM 安装 修复

    5月 15, 2020
  • wpf c# login and Upgrade

    12月 6, 2019
  • Facebook
  • Twitter
  • Instagram
  • Pinterest
  • Tumblr
  • Youtube
  • Bloglovin
  • Snapchat

@2019 - All Right Reserved. Designed and Developed by PenciDesign


Back To Top