找回密码
 立即注册

QQ登录

只需一步,快速开始

qinbinghao

初级会员

32

主题

93

帖子

295

积分

初级会员

积分
295

活字格认证微信认证勋章

qinbinghao
初级会员   /  发表于:2017-3-26 10:03  /   查看:3016  /  回复:9
如何获取GeneralCellType DropDownButton 下垃 ComboDropDown 事件

9 个回复

倒序浏览
dexteryao讲师达人认证 悬赏达人认证 SpreadJS 开发认证
超级版主   /  发表于:2017-3-27 11:02:02
沙发
您先什么问题,直接绑定事件就好了。
fpSpread1.ComboDropDown += FpSpread1_ComboDropDown;
回复 使用道具 举报
qinbinghao
初级会员   /  发表于:2017-3-27 15:48:20
板凳
Public Function GetGeneralCellType2(Optional FormatString As String = Nothing) As CellType.GeneralCellType
        Dim GeneralCellType As New CellType.GeneralCellType
        With GeneralCellType
            .DropDownButton = True
            ' AddHandler NumberCellType.EditorValueChanged, AddressOf FpSpread1_EditorValueChanged
            .ReadOnly = False
            If String.IsNullOrEmpty(FormatString) Then
                .FormatString = "#,###.####;;_"
            Else
                .FormatString = FormatString
            End If
            .Static = True
        End With
        Return GeneralCellType
    End Function
你好!如何绑定事件
回复 使用道具 举报
dexteryao讲师达人认证 悬赏达人认证 SpreadJS 开发认证
超级版主   /  发表于:2017-3-28 15:41:47
地板
  1. Dim cb As New FarPoint.Win.Spread.CellType.ComboBoxCellType()
  2. FpSpread1.ActiveSheet.Cells(0, 0).CellType = cb

  3. Private Sub FpSpread1_ComboCloseUp(ByVal sender As Object, ByVal e As FarPoint.Win.Spread.EditorNotifyEventArgs) Handles FpSpread1.ComboCloseUp
  4.      ListBox1.Items.Add("ComboCloseUp event fired")
  5. End Sub

  6. Private Sub FpSpread1_ComboDropDown(ByVal sender As Object, ByVal e As FarPoint.Win.Spread.EditorNotifyEventArgs) Handles
  7. FpSpread1.ComboDropDown
  8.      ListBox1.Items.Add("ComboDropDown event fired")
  9. End Sub

  10. Private Sub FpSpread1_ComboSelChange(ByVal sender As Object, ByVal e As FarPoint.Win.Spread.EditorNotifyEventArgs) Handles
  11. FpSpread1.ComboSelChange
  12.      ListBox1.Items.Add("ComboSelChange event fired")
  13. End Sub
复制代码
回复 使用道具 举报
qinbinghao
初级会员   /  发表于:2017-3-28 16:03:55
5#
这ComboBoxCellType() 我知道,  我是问  GeneralCellType如何设置
回复 使用道具 举报
Alice
社区贡献组   /  发表于:2017-3-28 17:49:30
6#
qinbinghao 发表于 2017-3-28 16:03
这ComboBoxCellType() 我知道,  我是问  GeneralCellType如何设置

谢谢您的反馈。
GeneralCellType没有暴露DropDownButton的下拉事件接口。
请点击评分,对我的服务做出评价!  5分为非常满意!

葡萄城控件服务团队

官方网站: http://www.gcpowertools.com.cn
回复 使用道具 举报
dexteryao讲师达人认证 悬赏达人认证 SpreadJS 开发认证
超级版主   /  发表于:2017-3-28 17:54:45
7#
没有直接暴露事件。您是想通过点击之后实现什么逻辑吗?
点击之后会进入编辑状态,触发EditModeOn 事件,你可以在这个事件中判断是否要处理逻辑fpSpread1.EditModeOn

如果您要弹出一个编辑框,可以使用subeditor  功能。
回复 使用道具 举报
qinbinghao
初级会员   /  发表于:2017-3-29 09:04:20
8#
好的,谢谢
回复 使用道具 举报
qinbinghao
初级会员   /  发表于:2017-3-29 10:41:09
9#
OK
回复 使用道具 举报
Alice
社区贡献组   /  发表于:2017-3-29 15:57:59
10#
请点击评分,对我的服务做出评价!  5分为非常满意!

葡萄城控件服务团队

官方网站: http://www.gcpowertools.com.cn
回复 使用道具 举报
您需要登录后才可以回帖 登录 | 立即注册
返回顶部