FpSpread表格控件,FpSpread事件介绍(一)
最近因项目需要,研究一下最强大的表格控件,FpSpread控件.
它是一款基于Web和Windows的高质量网格/电子表格组件,功能类似于Excel,
Spread集中在一件事上-使您简单的来开发您的用户能方便浏览并且更新表格数据所需的应用程序。
关于它的特点: (只是一小部分)
- 多表单
- 公式交叉表单应用
- 支持Unicode编码
- 按照明显的提示,移动行或列
- 新的科学计数法、单元格类型和数据格式
- 快速、经过改良的分类排序功能
- 增强功能的Spread设计器
- 自定义滚动条颜色、宽度和长度
- 双击标题。自动调整列宽以适应文本宽度
- 按百分比缩放打印
- 适合页面打印
- 水平居中、垂直居中打印
- 在打印页面的标题和底部添加字符/时间/数值
- 增强的图像类型支持,包括.gif 和.jpg
- 扩展提示文本(支持大于1000个字符)
- 当加载一个文件时,支持在一个单元格内保存32000个字符
- 当某一单元格获取焦点时,隐藏和显示焦点的矩形框
- 进入编辑状态时,自动定位光标至单元格
- 列标签转换(字母到数值、数值到字母)
- 在按钮单元格中对齐文本和图像
- 最大列宽计算,包括按钮单元格
- 不影响标题的情况下刷新绑定的Spread
''' <summary>
''' 单击单元格
''' </summary>
''' <param name="sender"></param>
''' <param name="e"></param>
''' <remarks></remarks>
Private Sub FpSpread1_CellClick(ByVal sender As Object, ByVal e As FarPoint.Win.Spread.CellClickEventArgs) Handles FpSpread1.CellClick
Me.ShowEvents("CellClick", "单击单元格")
End Sub
''' <summary>
''' 单元格双击
''' </summary>
''' <param name="sender"></param>
''' <param name="e"></param>
''' <remarks></remarks>
Private Sub FpSpread1_CellDoubleClick(ByVal sender As Object, ByVal e As FarPoint.Win.Spread.CellClickEventArgs) Handles FpSpread1.CellDoubleClick
Me.ShowEvents("CellDoubleClick", "双击单元格")
End Sub
''' <summary>
''' 单元格内容发生变变时
''' </summary>
''' <param name="sender"></param>
''' <param name="e"></param>
''' <remarks></remarks>
Private Sub FpSpread1_EditChange(ByVal sender As Object, ByVal e As FarPoint.Win.Spread.EditorNotifyEventArgs) Handles FpSpread1.EditChange
Me.ShowEvents("EditChange", "单元格内容变化")
End Sub
''' <summary>
''' 编辑单元格结束时,如按回车或焦点离开时
''' </summary>
''' <param name="sender"></param>
''' <param name="e"></param>
''' <remarks></remarks>
Private Sub FpSpread1_EditModeOff(ByVal sender As Object, ByVal e As System.EventArgs) Handles FpSpread1.EditModeOff
Me.ShowEvents("EditModeOff", "单元格编辑结束")
End Sub
''' <summary>
''' 编辑模式开始时
''' </summary>
''' <param name="sender"></param>
''' <param name="e"></param>
''' <remarks></remarks>
Private Sub FpSpread1_EditModeOn(ByVal sender As Object, ByVal e As System.EventArgs) Handles FpSpread1.EditModeOn
Me.ShowEvents("EditModeOn", "单元格开始编辑")
End Sub
''' <summary>
''' 单元格获取焦点时
''' </summary>
''' <param name="sender"></param>
''' <param name="e"></param>
''' <remarks></remarks>
Private Sub FpSpread1_EnterCell(ByVal sender As Object, ByVal e As FarPoint.Win.Spread.EnterCellEventArgs) Handles FpSpread1.EnterCell
Me.ShowEvents("EnterCell", "单元格获取焦点")
End Sub
''' <summary>
''' 单元格失去焦点时
''' </summary>
''' <param name="sender"></param>
''' <param name="e"></param>
''' <remarks></remarks>
Private Sub FpSpread1_LeaveCell(ByVal sender As Object, ByVal e As FarPoint.Win.Spread.LeaveCellEventArgs) Handles FpSpread1.LeaveCell
Me.ShowEvents("LeaveCel", "单元格失去焦点")
End Sub
其中FpSpread表格中选中一个单元格时,会引发三个事件Entercell,LeaveCell,CellClick
FpSpread表格编辑单元格过程时,会引发EditModeOn,N个EditChange,EditModeOff事件
posted on 2008-12-12 14:49 zqonline 阅读(11397) 评论(2) 编辑 收藏 举报